Skip to content

Aborted connection to db: '...' user: '...' host: '...' (Got an error reading communication packets) #990

Answered by Cycloctane
jowin202 asked this question in Q&A
Discussion options

You must be logged in to vote

aiomysql simply closes the tcp connection without sending COM_QUIT packet when conn.close() is called.
You can use await conn.ensure_closed() to avoid error messages. ensure_closed() can send COM_QUIT and then close the connection safely.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Cycloctane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants