You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if there timeout is occurred I'll get the next traceback:
Traceback (most recent call last):
...
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/connection.py", line 100, in execute
yield from cursor.execute(str(compiled), post_processed_params[0])
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/cursor.py", line 112, in execute
yield from self._conn._poll(waiter, timeout)
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/connection.py", line 162, in _poll
yield from asyncio.wait_for(self._waiter, timeout, loop=self._loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 381, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/connection.py", line 185, in _rollback_impl
yield from cur.execute('ROLLBACK')
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/cursor.py", line 107, in execute
self._impl.execute(operation, parameters)
psycopg2.ProgrammingError: execute cannot be used while an asynchronous query is underway
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/transaction.py", line 67, in rollback
yield from self._do_rollback()
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/transaction.py", line 95, in _do_rollback
yield from self._connection._rollback_impl()
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/connection.py", line 187, in _rollback_impl
cur.close()
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/cursor.py", line 49, in close
self._impl.close()
psycopg2.ProgrammingError: close cannot be used while an asynchronous query is underway
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/engine.py", line 190, in exit
self._engine.release(self._conn)
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/engine.py", line 133, in release
raise InvalidRequestError("Cannot release a connection with "
aiopg.sa.exc.InvalidRequestError: Cannot release a connection with not finished transaction
As I think if we get TimoutError while the query executing, the query should be cancelled.
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I've got a problem with aiopg when using transaction. I've used a simple code for transaction:
But if there timeout is occurred I'll get the next traceback:
Traceback (most recent call last):
...
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/connection.py", line 100, in execute
yield from cursor.execute(str(compiled), post_processed_params[0])
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/cursor.py", line 112, in execute
yield from self._conn._poll(waiter, timeout)
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/connection.py", line 162, in _poll
yield from asyncio.wait_for(self._waiter, timeout, loop=self._loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 381, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/connection.py", line 185, in _rollback_impl
yield from cur.execute('ROLLBACK')
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/cursor.py", line 107, in execute
self._impl.execute(operation, parameters)
psycopg2.ProgrammingError: execute cannot be used while an asynchronous query is underway
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/transaction.py", line 67, in rollback
yield from self._do_rollback()
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/transaction.py", line 95, in _do_rollback
yield from self._connection._rollback_impl()
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/connection.py", line 187, in _rollback_impl
cur.close()
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/cursor.py", line 49, in close
self._impl.close()
psycopg2.ProgrammingError: close cannot be used while an asynchronous query is underway
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/engine.py", line 190, in exit
self._engine.release(self._conn)
File "/home/alex/work/python/.envs/stload3/lib/python3.4/site-packages/aiopg/sa/engine.py", line 133, in release
raise InvalidRequestError("Cannot release a connection with "
aiopg.sa.exc.InvalidRequestError: Cannot release a connection with not finished transaction
As I think if we get TimoutError while the query executing, the query should be cancelled.
Thanks
The text was updated successfully, but these errors were encountered: