Skip to content
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

Connection pool can not close its connections properly #112

Open
Cycloctane opened this issue Dec 6, 2024 · 1 comment · May be fixed by #113
Open

Connection pool can not close its connections properly #112

Cycloctane opened this issue Dec 6, 2024 · 1 comment · May be fixed by #113

Comments

@Cycloctane
Copy link
Contributor

asyncmy cannot close connections properly when pool is closed or connections in pool timed out. Example for connection pool in readme causes error messages on mysql server:

[Note] [MY-010914] [Server] Aborted connection ... to db ... (Got an error reading communication packets)

Traffic analysis indicates that there are no COM_QUIT packets sent when closing connections in connection pool. It seems that this is because connection pool uses conn.close() to close connections in pool, which simply remove the socket without sending COM_QUIT packets to server. Change it to conn.ensure_closed() will solve the problem.

@Cycloctane Cycloctane linked a pull request Dec 6, 2024 that will close this issue
@Cycloctane
Copy link
Contributor Author

It seems that this issue also exists in aiomysql (aio-libs/aiomysql#987), and haven't been fixed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant