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
i hit a max connection limit using this module. is the connection released back to the pool? I looked at the code and it doenst look like it?
how im using it:
const retries = 10; // How many times will the query be retried when the ER_LOCK_DEADLOCK error occurs
const minMillis = 1000; // The minimum amount of milliseconds that the system sleeps before retrying
const maxMillis = 10000; // The maximum amount of milliseconds that the system sleeps before retrying
pool.on('connection', (connection) => {
proxyMysqlDeadlockRetries(connection, retries, minMillis, maxMillis);
});
Generally the one calling getConnection is responsible to release it as well. The module never acquires a connection and thus never releases it. It is ignorant to where the connection comes from.
The proxyMysqlDeadlockRetries will eventually call the next function so in your code it should always execute the branch that calls connection.release(). It looks good to me. Have you tried a counter that logs how many times a connection is acquired and released?
i hit a max connection limit using this module. is the connection released back to the pool? I looked at the code and it doenst look like it?
how im using it:
and when i execute a query
The text was updated successfully, but these errors were encountered: