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
Perhaps, I don't understand the intent of acquireTimeout - or it has a bug.
I can set my pool to a small number (e.g. 2), and invoke (bad) code that does not properly release a connection. Once, I exhaust the connectionLimit, connections start queuing - but will wait indefinitely regardless of how low I specify the acquireTimeout (e.g. 1000ms).
I can force an error with lowering the queueLimit, or by setting waitForConnections: false, but what I really wanted was to only generate an error when it takes a long time to get a connection from the pool.
Ah, yea, I think the docs can be improved there -- the acquireTimeout option does not have anything to do with waiting for a checked out connection to be released back to the pool -- there is no timeout option around that case currently.
The acquireTimeout comes with the "acquire" routine internally which basically is the process or either (a) opening a new connection to the server or (b) validating a free connection is still alive.
It sounds like two things from your report:
(a) improve docs around acquireTimeout to better describe what exactly the timeout is around (what I said is just an incomplete summary -- someone needs to validate that is accurate to land in docs)
(b) add a timeout option around requests that are in the queue to wait for a connection to be returned to the pool.
Perhaps, I don't understand the intent of acquireTimeout - or it has a bug.
I can set my pool to a small number (e.g. 2), and invoke (bad) code that does not properly release a connection. Once, I exhaust the connectionLimit, connections start queuing - but will wait indefinitely regardless of how low I specify the acquireTimeout (e.g. 1000ms).
I can force an error with lowering the queueLimit, or by setting waitForConnections: false, but what I really wanted was to only generate an error when it takes a long time to get a connection from the pool.
(I did see a feature request referring to a maxWait or queueWaitTimeout - but a comment said it was the same as acquireTimeout.)
Thanks for any assistance.
The text was updated successfully, but these errors were encountered: