asyncmy icon indicating copy to clipboard operation
asyncmy copied to clipboard

Lost connection to MySQL server despite periodic pings

Open MarkReedZ opened this issue 4 years ago • 2 comments

Every 60 seconds I acquire from my pool and ping yet I'm still getting lost connections. Is ping working or is this not the way to prevent this problem? Am I not walking through all connections in the pool?

(2013, 'Lost connection to MySQL server during query')

    await asyncio.sleep(60)

    async with ws.pool.mysql_pool.acquire() as conn:
      await conn.ping(True)

MarkReedZ avatar Nov 11 '21 20:11 MarkReedZ

What about try pool_recycle?

long2ice avatar Nov 12 '21 01:11 long2ice