AioMySQL lost connection during query
i want the aiomysql never git stoped from getting lost how ?
GitMate.io thinks possibly related issues are https://github.com/aio-libs/aiomysql/issues/286 (Remove a connection from aiomysql.Pool), https://github.com/aio-libs/aiomysql/issues/166 (Aborted connection), https://github.com/aio-libs/aiomysql/issues/330 (Lost connection to MySQL server during query), https://github.com/aio-libs/aiomysql/issues/158 (aiomysql enabled cache?), and https://github.com/aio-libs/aiomysql/issues/11 (rename Connection.wait_closed()).
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.
@MarkReedZ Yeah, I think the doc about pool_recycle should be updated. Besides, how about renaming it to pool_recycle_timeout to avoid misunderstanding?
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.