-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
PG queries are not timing out on server going down #3399
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
Comments
@Scorpio1987 try setting the |
@stas-ut21 That didn't solve the issue. After debugging more and looking through the code, it seems like the underlying client is stuck waiting for the response for the query from the server. This is the flow of things happened.
|
You’ll probably also want to set the (undocumented?) |
pls write a sample code |
I am seeing an issue where the query doesn't timeout and the client connection stays indefinitely even when the server goes down.
I check out a client using pool.connect() and then call client.query()
I used a query that runs 30 seconds. Before the query completes, i bring down network connection to the server and this results in query being stuck forever.
I tried it using query_timeout and as expected client.query() fails with "Query read timeout" error if the network connection to server is lost. But when i try the next query, i don't see any packets being sent out and the next query also times out with the above error.
Please let me know if there is a way to solve this query being stuck issue.
The text was updated successfully, but these errors were encountered: