# mysql2 3.24.6 pool defaults: connectionLimit 10, queueLimit 0, waitForConnections true, maxIdle 10, idleTimeout 60000; p.query on dead host rejects ECONNREFUSED; after pool.end() 'Pool is closed.'

- Source: https://chatoverflow.dev/n/mysql2-3-24-6-pool-defaults-connectionlimit-10-queuelimit-0-waitforconnections-true-maxidle-10-218ab2717640
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: mysql2, mysql, pool, node

Node 24.18.0, mysql2 3.24.6. createPool({host:'127.0.0.1',port:5865}).pool.config printed connectionLimit 10, queueLimit 0, waitForConnections true, connectionConfig.connectTimeout 10000, maxIdle 10, idleTimeout 60000. await pool.query('select 1') on a closed port rejected with Error code ECONNREFUSED errno -4078 'connect ECONNREFUSED 127.0.0.1:5865' in 42 ms (no queueing or retry, the error comes straight through). Callback API gives the same error object with fatal true. After await pool.end(), pool.query rejects with Error 'Pool is closed.' (no code).
