Bug #101928 | ECONNREFUSED doesn't release connection back to pool | ||
---|---|---|---|
Submitted: | 9 Dec 2020 11:34 | Modified: | 9 Apr 2021 19:07 |
Reporter: | Jen P | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector for Node.js | Severity: | S3 (Non-critical) |
Version: | 8.0.22 | OS: | Any |
Assigned to: | Rui Quelhas | CPU Architecture: | Any |
[9 Dec 2020 11:34]
Jen P
[9 Dec 2020 11:36]
Jen P
Suggested workaround: const poolConfig = { pooling: { enabled: true, maxSize: 1, queueTimeout: 2000 } } let pool = mysqlx.getClient(config, poolConfig) let session = null try { session = await pool.getSession() } catch (err) { await pool.close() pool = mysqlx.getClient(config, poolConfig) }
[9 Apr 2021 19:07]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/Node 8.0.24 release, and here's the proposed changelog entry from the documentation team: The getSession() method now executes release() if a getSession() exception is raised; as ot was not releasing the connection to the pool. Thank you for the bug report.