Debugging connection attempt timeouts #1370
-
Hi, After a failed connection attempt I get an OperationalError which doesn't provide much information. I suspect psycopg can't really provide this kind of information, but perhaps someone can provide some python lower level suggestions to debug the issue. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 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 More likely, it's something that happens within the bowels of RDS and the client is not made aware of anything. |
Beta Was this translation helpful? Give feedback.
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…