Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgresError: DbHandler exited #5

Closed
jumski opened this issue Jan 27, 2025 · 1 comment
Closed

PostgresError: DbHandler exited #5

jumski opened this issue Jan 27, 2025 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jumski
Copy link
Contributor

jumski commented Jan 27, 2025

This error pops up from time to time:


[Error] Timeout-triggered archive failed: PostgresError: DbHandler exited
    at ErrorResponse (https://deno.land/x/[email protected]/src/connection.js:791:26)
    at handle (https://deno.land/x/[email protected]/src/connection.js:477:6)
    at data (https://deno.land/x/[email protected]/src/connection.js:318:9)
    at https://deno.land/x/[email protected]/polyfills.js:138:30
    at Array.forEach (<anonymous>)
    at call (https://deno.land/x/[email protected]/polyfills.js:138:16)
    at success (https://deno.land/x/[email protected]/polyfills.js:98:9)
    at eventLoopTick (ext:core/01_core.js:168:7) {
  name: "PostgresError",
  severity_local: "FATAL",
  severity: "FATAL",
  code: "XX000"
}

This issue appears to be related to abruptly terminated SQL connections in Session Mode. When this error occurs, it prevents the system from spawning new instances.

I verified the number of connections and I confirm that the worker does not properly release them when terminated.

The solution would be to set a low idle timeout in supavisor or give workers more time to terminate SQL connections properly

@jumski jumski added bug Something isn't working help wanted Extra attention is needed labels Jan 27, 2025
@jumski
Copy link
Contributor Author

jumski commented Feb 7, 2025

I managed to solve it in #12 by using transaction mode.
It is still possible to exhaust the connection pool (see docs), but it should not happen for non-extreme usage.

@jumski jumski closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant