You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It feels like for whatever reason idle connections are not removed from pool when server closes them after wait_timeout. Can you check this line is called after 10 minutes?
Maybe not with pool but with one single persistent connection:
constconn=mysql.createConnection(config);conn.on('error',err=>{console.log('Connection error:',err');// this line is expected to be called when server terminates connection});conn.query('select 1+1');
Test
results of execution
first query, Pool value:
Execute the second time without rest:
Take a 10-minute break and execute again:
Other:
const mysqlConfig = {
host: ‘localhost’,
user: ‘root’,
password: ‘root’,
database: ‘my_db’,
port: 3306,
};
mysql version:5.6.31
use mysql + co running the same code is OK,No database settings have been made, wait_timeout is 28800
The text was updated successfully, but these errors were encountered: