Skip to content

Using pgxpool and the connection goes away #2155

Closed Answered by jackc
nchelluri asked this question in Q&A
Discussion options

You must be logged in to vote

I had expected the pool.Ping() call to return an error, but actually it never returns.

If the connection is open as far as the client is concerned, then it may wait until the underlying net.Conn realizes it is dead. You may want to pass Ping a context with a deadline to handle broken connections.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by nchelluri
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants