node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

not closing connection

Open alexribeirodesa opened this issue 3 years ago • 0 comments

hello, I'm developing a next.js with a mysql database, I'm using planetscale as database server... here a small example of code: ` connection = await mysql.createConnection(process.env.MYSQL_URL); await connection.connect();

[any kind of query here]

connection.close(); `

when I check the connections in planetscale dashboard, every connections still open, I just close the connections when I close the node app...

I've tested close, end and destroy commands with same result...

I don't know what I'm doing wrong or if I miss something...

Thx, Alexandre

alexribeirodesa avatar Jul 21 '22 21:07 alexribeirodesa