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
{{ message }}
Repository navigation
generic-pool "Resource not currently part of this pool" exceptions for mssql #8098
It seems like connections are dying before they are returned to the pool. The following exception is thrown quite often:
Error: Resource not currently part of this pool
at Pool.destroy (/data/node_modules/generic-pool/lib/Pool.js:450:35)
at Connection.connection.on.err (/data/node_modules/sequelize/lib/dialects/mssql/connection-manager.js:124:25)
at emitOne (events.js:96:13) at Connection.emit (events.js:188:7)
at Connection.socketError (/data/node_modules/tedious/lib/connection.js:703:14)
at emitOne (events.js:101:20) at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
I'm seeing a similar issue, but with Pool.release:
Unhandled rejection Error: Resource not currently part of this pool
at Pool.release (/Users/mhuggins/Development/bittrex-monitor/node_modules/generic-pool/lib/Pool.js:422:35)
at ConnectionManager.releaseConnection (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:292:22)
at Transaction.cleanup (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/transaction.js:165:50)
at sequelize.getQueryInterface.rollbackTransaction.finally (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/transaction.js:95:23)
From previous event:
at Transaction.rollback (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/transaction.js:93:15)
at connectionPromise.then.then.then.then.then.catch.setupErr (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/transaction.js:123:31)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
at Transaction.prepareEnvironment (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/transaction.js:123:13)
at Sequelize.transaction (/Users/mhuggins/Development/bittrex-monitor/node_modules/sequelize/lib/sequelize.js:952:43)
at Tracker._callee5$ (/Users/mhuggins/Development/bittrex-monitor/build/tracker/index.js:225:41)
at tryCatch (/Users/mhuggins/Development/bittrex-monitor/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/Users/mhuggins/Development/bittrex-monitor/node_modules/regenerator-runtime/runtime.js:303:22)
at Generator.prototype.(anonymous function) [as next] (/Users/mhuggins/Development/bittrex-monitor/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/Users/mhuggins/Development/bittrex-monitor/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/mhuggins/Development/bittrex-monitor/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14
at Promise (<anonymous>)
at F (/Users/mhuggins/Development/bittrex-monitor/node_modules/core-js/library/modules/_export.js:35:28)
at Tracker.<anonymous> (/Users/mhuggins/Development/bittrex-monitor/node_modules/babel-runtime/helpers/asyncToGenerator.js:14:12)
at Tracker.saveCandles (/Users/mhuggins/Development/bittrex-monitor/build/tracker/index.js:269:20)
at Tracker._callee3$ (/Users/mhuggins/Development/bittrex-monitor/build/tracker/index.js:142:40)
at tryCatch (/Users/mhuggins/Development/bittrex-monitor/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/Users/mhuggins/Development/bittrex-monitor/node_modules/regenerator-runtime/runtime.js:303:22)
at Generator.prototype.(anonymous function) [as next] (/Users/mhuggins/Development/bittrex-monitor/node_modules/regenerator-runtime/runtime.js:117:21)
at step (/Users/mhuggins/Development/bittrex-monitor/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /Users/mhuggins/Development/bittrex-monitor/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
There is a PR to generic-pool which is supposed to prevent this from happening. See coopernurse/node-pool#201
This is a huge issue for us as it is delaying us going to production on our software. It only happens when running in remote cloud environments. I am going to manually apply this patch on our nightly environments and see if we get a bit more stability.
Also seeing the issue @mhuggins has with mysql on Sequelize 4.8.2
As far as I can tell the PR to generic-pool that is supposed to fix it is not helping.
UPDATE: generic-pool has been updated to a new version that is supposed to fix this, however I cannot confirm that it's fixed (at least for the error @mhuggins and me are experiencing) – I still get the error
Unhandled rejection Error: Resource not currently part of this pool
at Pool.release (/api/node_modules/generic-pool/lib/Pool.js:426:35)
Activity
mhuggins commentedon Aug 20, 2017
I'm seeing a similar issue, but with
Pool.release:dylandechant commentedon Aug 23, 2017
also seeing this with mssql
4.6.0
tylerjwatson commentedon Aug 28, 2017
There is a PR to generic-pool which is supposed to prevent this from happening. See coopernurse/node-pool#201
This is a huge issue for us as it is delaying us going to production on our software. It only happens when running in remote cloud environments. I am going to manually apply this patch on our nightly environments and see if we get a bit more stability.
maxsommer commentedon Sep 11, 2017
Also seeing the issue @mhuggins has with mysql on Sequelize 4.8.2
As far as I can tell the PR to generic-pool that is supposed to fix it is not helping.
UPDATE: generic-pool has been updated to a new version that is supposed to fix this, however I cannot confirm that it's fixed (at least for the error @mhuggins and me are experiencing) – I still get the error