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

AioMySQL lost connection during query #383

Open
xrokz opened this issue Feb 4, 2019 · 4 comments
Open

AioMySQL lost connection during query #383

xrokz opened this issue Feb 4, 2019 · 4 comments
Labels

Comments

@xrokz
Copy link

xrokz commented Feb 4, 2019

i want the aiomysql never git stoped from getting lost how ?

@aio-libs-bot
Copy link

GitMate.io thinks possibly related issues are #286 (Remove a connection from aiomysql.Pool), #166 (Aborted connection), #330 (Lost connection to MySQL server during query), #158 (aiomysql enabled cache?), and #11 (rename Connection.wait_closed()).

@MarkReedZ
Copy link

Issues isn't for questions - you can use stackoverflow for questions. If you use a pool you can set pool_recycle=60 when creating it and connections open for 60 seconds without being used will be closed and reopened.

To make this an actual issue the documentation needs to be updated to cover pool_recycle. Should the pool example be updated to use pool_recycle? It would save newbies from hitting this problem perhaps.

An example to handle exceptions may be useful as well. It could show how to catch this exception and reconnect perhaps.

@wtdcode
Copy link

wtdcode commented Mar 30, 2019

@MarkReedZ Yeah, I think the doc about pool_recycle should be updated. Besides, how about renaming it to pool_recycle_timeout to avoid misunderstanding?

@MarkReedZ
Copy link

Yeah, looking at my code renaming it would be a good idea as it isn't clear. I'll look at making a PR in a few days if I have time.

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

No branches or pull requests

4 participants