postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Erroneous use closed connection by timeout from pool

Open uasan opened this issue 3 years ago • 2 comments

Hello. We get an error write CONNECT_TIMEOUT undefined:undefined every day.

From the TCP dump, we can see that when the application starts, the client opens many connections, in each connection a response from postgres for authorization is received, some connections instead of sending a password send a FIN packet and close the connections, but it looks like this closed connection remains in the pool and later it is used for sending SQL requests, at this moment we get the indicated error.

To connect, we use the default settings, there are no specific settings, the connection takes place directly, Postgres 14.

uasan avatar Aug 08 '22 10:08 uasan

Hi @uasan .

Does your application run at least the same amount of queries at startup as connections being opened?

porsager avatar Aug 09 '22 05:08 porsager

yes, many requests are processed, but this error appears from time to time, this error sometimes occurs when a new connection is created to send a SQL request

uasan avatar Aug 09 '22 08:08 uasan

We seem to have identified the problem, it is not on the side of postgres.js, I am closing the ticket

uasan avatar Aug 25 '22 08:08 uasan

Hey @uasan - glad to hear, and sorry for the silence, my time is limited these days.

Still, I'm very curious to hear what the issue was?

porsager avatar Aug 25 '22 20:08 porsager

When the network is congested, the socket does not respond within the specified time limit

uasan avatar Aug 26 '22 08:08 uasan