Skip to content

Debugging connection attempt timeouts #1370

Answered by dvarrazzo
fschroder-slyp asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to see something more of the connection process within psycopg2 you might build the package with debug information and check if there are useful logging on connection time. On top of that you might want to enable the green mode and use the wait_select() function which might give you some extra logging. Instructions for both are in the documentation.

Another option is to try to connect using psycopg 3 and hack into its source to look for more logs. I can't remember if it still produces debug info on connection, which you might enable putting the psycopg logger to debug level and configuring a handler for it. For some time such code was there but it might have been yanked out be…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fschroder-slyp
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