-
Notifications
You must be signed in to change notification settings - Fork 256
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
Pre ping failing with uvloop #966
Comments
same issue, in my case, pool_recycle=3600, mysql wait_timeout is 28800 Logs/tracebacks
SQLAlchemy and here is a related pr
|
Same issue +1, is there any fix for it now? Version List:
The version of MySQL is 8.0.39. |
Can be fixed by not using uvloop but vanilla asyncio instead: In case one of your used packages depends on uvloop (which was the case for me) just add
before any async operation is started. An MRE has also been shared recently in case you want to reproduce the issue. |
Describe the bug
When using
aiomysql
withuvloop==0.17.0
, whenever MySQL closes a connection (due towait_timeout
), the subsequent pre-ping command fails with:This bug does not occur when
uvloop
is not used. Not sure whether to raise the issue withuvloop
instead.Might be related to #195?
To Reproduce
uvloop==0.17.0
anduvicorn==0.23.2
.pre_ping=True
andpool_recycle
not set.wait_timeout
.Expected behavior
The pre-ping request should succeed, and the HTTP request should succeed as well.
Logs/tracebacks
Python Version
3.11.4
aiomysql Version
0.2.0
PyMySQL Version
1.0.3
SQLAlchemy Version
2.0.19
OS
Ubuntu 20.04.4 LTS
Database type and version
8.0.15
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: