-
Notifications
You must be signed in to change notification settings - Fork 157
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
Closing connection object throws exception #65
Comments
Got it. |
We are also facing this issue, can you please patch this. We don't specify a timeout value though. Specifically for us it occurs when we pass a 'sub-query' to cursor.execute |
What do you mean by sub-query? |
Changing this from a ProgrammingError to a TimeoutError seems to have been done in 8ca948e, which also makes sure the connection and cursor are closed when it happens. Can this issue be closed? |
Not yet. I should fix closing cursor with pending query first. |
Do we have any estimate for the fix? If sub-query is hard to implement, I think we should include the initial problem as soonn as possible. Because currently this blocks one from implementing a retry policy on specific DB errors. e.g: retry query on TimeOut Error 2 times. |
Fixed, d0e5f86 has explicit test for the issue |
Hi,
I am using aiopg with a Pool object that is shared among coroutines. Every once in a while, randomly I see following error:
psycopg2.ProgrammingError: close cannot be used while an asynchronous query is u
nderway
I can reproduce the issue with following:
It seems valid to raise TimeoutError rather than ProgrammingError, I believe. What do you think?
Thanks,
The text was updated successfully, but these errors were encountered: