Skip to content

Docker: Hydra connection pool exhaustion when history is disabled #1048

@k1bac

Description

@k1bac

Environment details:

  • NZBHydra2 version: 8.3.0
  • Docker image: linuxserver/nzbhydra2:v8.3.0-ls74 (Release, by linuxserver.io)
  • Host OS: Debian Trixie

Expected and actual behavior:

  • Expected: Hydra should remain operational indefinitely when history is disabled. Cleanup tasks should not exhaust the database connection pool.
  • Actual: After some uptime (days to a week), all database-related actions fail with connection pool exhaustion errors. Restarting the container resolves the issue temporarily.

Reproducibility:

  • Problem occurs consistently if history is disabled ("Keep history" off).
  • Does not appear if history is enabled, even with a short retention period (e.g., 1 week).
  • Moderate usage, reproducible over time.

Steps to reproduce:

  1. Run nzbhydra2 in Docker (linuxserver/nzbhydra2:v8.3.0-ls74)
  2. In settings, disable history (Keep history: off)
  3. Use as normal for several days under moderate/typical load
  4. Eventually, these errors occur:
    • Could not open JPA EntityManager for transaction (Error Code: 900)
    • Unable to acquire JDBC Connection [HikariPool-1 - Connection is not available, request timed out after 30000ms.]
    • Could not open JPA EntityManager
  5. Restarting the container always clears the error for a while.

GUI info:
Not a GUI bug


Searched for problem:

  • Yes, checked previous issues (including Hydra2 timeout #289); this is specific to Docker with history disabled.

Let me know if you need further info or logging at debug/trace level. Can keep container running in broken state for diagnostics if required.

This issue was written with Copilot, findings are my own and were done manually. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions