Can't get Timeouts to work #577
thomasplarsson
started this conversation in
Potential issue
Replies: 1 comment
-
Hey @thomasplarsson Hi Thomas, I know its been a while since you posted this issue, but it likely stems from how databases handles timeouts with its connection pool. Try disabling pooling by using a direct connection: async with db.connection() as conn: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I have a problem with timeouts not being raised as expected. If I pause a database (as in, pausing a postgres docker) and run an execute statement with a 5 sec timeout, this doesn't raise an exception until I unpause the database. The corresponding code with pure asyncpg works as expected. I'm wondering if I'm missing something obvious here.
My reproduce.py script:
As far as I can see, those timeout properties are propagated down from the Database object to the underlying connection just as if I instantiate the connection myself. Feels like it something else. Has anyone else seen this and perhaps have a clue?
Thanks
/Thomas
Beta Was this translation helpful? Give feedback.
All reactions