Open
Description
Hello!
We're observing the following behavior on our servers:
- We use pg-pool to connect to a load balanced pool of pgbouncer
- Occasionally we see connections closed from our application, but still alive on pgbouncer side
- This exhausted the server connections on pgbouncer machines and cause issue
- The server connection linked to that pgbouncer connection shows it's waiting on
ClientRead
This happens after we upgraded our pg
from 7.4.3
to 8.3.0
. And the following code stands out, which might be the cause.
In this commit, the Client.end()
method is changed
- Before it calls
connection.end()
even after destroying the stream - Now if there's an active query, it only destroys the stream and not end the connection
We haven't been 100% sure this is the root cause, but I wonder if this is an intentional change. Logically it seems to make sense to close that connection no matter what. Would love your thoughts on this, let me know if I have any missing context, thanks a lot!
Metadata
Metadata
Assignees
Labels
No labels