[CONJS-138] pool.getConnection() might not timeout even with acquireTimeout set Created: 2020-06-30  Updated: 2020-07-01  Resolved: 2020-07-01

Status: Closed
Project: MariaDB Connector/node.js
Component/s: pool
Affects Version/s: None
Fix Version/s: 2.4.1

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

Initially describe here

Pool option `acquireTimeout` ensure that pool.getConnection() throw an error if there is no available connection after this timeout is reached.

When connection stays in pool unused for some time (`minDelayValidation` option), pool will return those connection after a validation (PING to server). The issue is that when using proxy between client and server, socket to proxy might still be open, but proxy might be busy reconnecting server for an unknown amount of time. In those case, `acquireTimeout` is not respected, and pool.getConnection() might wait indefinitely.

Goal of this task if that this validation has to be limited in time in order to throw an exception.



 Comments   
Comment by Diego Dupin [ 2020-07-01 ]

corrected with commit https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/07fb091a571f2a516cce47302ac11b74119bbd48

Generated at Thu Feb 08 03:23:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.