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
When the database connection runs out and a new request is sent, an error occurd and the whole application goes down!
in the aiomysql/utils.py, line 137
when a new request arrives , If the connection is exhausted, then wait for it release
Logs/tracebacks
Error handling request
Traceback (most recent call last):
File "test_aiomysql.py", line 20, in testawait asyncio.sleep(60)
File "/usr/lib/python3.7/asyncio/tasks.py", line 595, in sleepreturnawait future
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/yangshen/Envs/fmp_37/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp =awaitself._request_handler(request)
File "/home/yangshen/Envs/fmp_37/lib/python3.7/site-packages/aiohttp/web_app.py", line 499, in _handle
resp =await handler(request)
File "test_aiomysql.py", line 21, in testawait trans.commit()
File "/home/yangshen/Envs/fmp_37/lib/python3.7/site-packages/aiomysql/utils.py", line 139, in __aexit__awaitself._pool.release(self._conn)
File "/home/yangshen/Envs/fmp_37/lib/python3.7/site-packages/aiomysql/sa/engine.py", line 163, in releaseraise InvalidRequestError("Cannot release a connection with "aiomysql.sa.exc.InvalidRequestError: Cannot release a connection with not finished transaction
Python Version
$ python --version3.7.5
aiomysql Version
$ python -m pip show aiomysql0.1.0
PyMySQL Version
$ python -m pip show PyMySQL1.1.0
SQLAlchemy Version
$ python -m pip show sqlalchemy1.4.49
OS
ubuntu 18.04
Database type and version
5.7.39-0ubuntu0.18.04.2
Additional context
No response
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
Describe the bug
When the database connection runs out and a new request is sent, an error occurd and the whole application goes down!
in the aiomysql/utils.py, line 137
why release the whole connection pool?
To Reproduce
Expected behavior
when a new request arrives , If the connection is exhausted, then wait for it release
Logs/tracebacks
Python Version
aiomysql Version
PyMySQL Version
SQLAlchemy Version
OS
ubuntu 18.04
Database type and version
5.7.39-0ubuntu0.18.04.2
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: