node-mysql2
node-mysql2 copied to clipboard
Warning: got packets out of order. Expected 2 but received 0 (on close() )
I saw quite a few tickets concerning this error here already, but none are reporting it for a connection close. I updated a setup using Percona server and mysql2, which worked perfectly well for years but can't say where this error is coming from now. The problem arises only when all queries were sent and a final await conn.close() is sent. No pooling is used here, just a simple
db = await mysql.createConnection()
await db.query(query)
await db.close() // where the error occurs
Here are the versions used:
- MySQL version: 8.0.37-29 (Percona Server)
- Ubuntu: 20.04.6 LTS
- node v20.17.0
- mysql2 3.11.0
Hi, @infusion 🙋🏻♂️
I quickly checked https://docs.percona.com/percona-server/8.0/quickstart-docker.html. Could you share a local reproduction?
I don't know why but upgrading to mysql2 3.11.3 fixed the issue. Thanks!