Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'prev' of null #275

Open
berndartmueller opened this issue Nov 23, 2019 · 0 comments
Open

Cannot read property 'prev' of null #275

berndartmueller opened this issue Nov 23, 2019 · 0 comments

Comments

@berndartmueller
Copy link

berndartmueller commented Nov 23, 2019

Hey!

Lately we experience randomly this Cannot read property 'prev' of null while using [email protected] and [email protected]. It just happens out of no where. But I noticed that whenever it happens, the current postgres connection count increases and reaches the pool limit of 5 per node.js instance.

TypeError: Cannot read property 'prev' of null,
at DoublyLinkedList.remove (/usr/src/app/node_modules/generic-pool/lib/DoublyLinkedList.js:69:14),
at Deque.shift (/usr/src/app/node_modules/generic-pool/lib/Deque.js:24:16),
at Pool._testOnBorrow (/usr/src/app/node_modules/generic-pool/lib/Pool.js:160:51),
at Pool._dispense (/usr/src/app/node_modules/generic-pool/lib/Pool.js:240:14),
at Pool.acquire (/usr/src/app/node_modules/generic-pool/lib/Pool.js:453:10),
at promise.then (/usr/src/app/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:274:24),
at bound (domain.js:402:14),
at runBound (domain.js:415:12),
at tryCatcher (/usr/src/app/node_modules/bluebird/js/release/util.js:16:23),
at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/bluebird/js/release/promise.js:512:31),
at Promise._settlePromise (/usr/src/app/node_modules/bluebird/js/release/promise.js:569:18),
at Promise._settlePromiseCtx (/usr/src/app/node_modules/bluebird/js/release/promise.js:606:10),
at _drainQueueStep (/usr/src/app/node_modules/bluebird/js/release/async.js:142:12),
at _drainQueue (/usr/src/app/node_modules/bluebird/js/release/async.js:131:9),
at Async._drainQueues (/usr/src/app/node_modules/bluebird/js/release/async.js:147:5),
at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/app/node_modules/bluebird/js/release/async.js:17:14),
at runCallback (timers.js:705:18),
at tryOnImmediate (timers.js:676:5),
at processImmediate (timers.js:658:5),
at process.topLevelDomainCallback (domain.js:126:23)
]

Additionall, also following error happens:

TypeError: Cannot read property 'databaseVersion' of undefined,
at ConnectionManager.getConnection (/usr/src/app/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:246:32),
at Promise.try (/usr/src/app/node_modules/sequelize/lib/sequelize.js:554:34),
at tryCatcher (/usr/src/app/node_modules/bluebird/js/release/util.js:16:23),
at Function.Promise.attempt.Promise.try (/usr/src/app/node_modules/bluebird/js/release/method.js:39:29),
at Promise.resolve.retryParameters (/usr/src/app/node_modules/sequelize/lib/sequelize.js:454:64),
at /usr/src/app/node_modules/retry-as-promised/index.js:39:21,
at Promise._execute (/usr/src/app/node_modules/bluebird/js/release/debuggability.js:313:9),
at Promise._resolveFromExecutor (/usr/src/app/node_modules/bluebird/js/release/promise.js:483:18),
at new Promise (/usr/src/app/node_modules/bluebird/js/release/promise.js:79:10),
at retryAsPromised (/usr/src/app/node_modules/retry-as-promised/index.js:29:10),
at Sequelize.query (/usr/src/app/node_modules/sequelize/lib/sequelize.js:454:28),
at QueryInterface.select (/usr/src/app/node_modules/sequelize/lib/query-interface.js:1104:27),
at Promise.try.then.then.then (/usr/src/app/node_modules/sequelize/lib/model.js:1604:34),
at bound (domain.js:402:14),
at runBound (domain.js:415:12),
at tryCatcher (/usr/src/app/node_modules/bluebird/js/release/util.js:16:23),
at Promise._settlePromiseFromHandler (/usr/src/app/node_modules/bluebird/js/release/promise.js:512:31),
at Promise._settlePromise (/usr/src/app/node_modules/bluebird/js/release/promise.js:569:18),
at Promise._settlePromise0 (/usr/src/app/node_modules/bluebird/js/release/promise.js:614:10),
at Promise._settlePromises (/usr/src/app/node_modules/bluebird/js/release/promise.js:694:18),
at _drainQueueStep (/usr/src/app/node_modules/bluebird/js/release/async.js:138:12),
at _drainQueue (/usr/src/app/node_modules/bluebird/js/release/async.js:131:9)
]
}

Does someone else also experience this behaviour? Any ideas how to fix it? Is it fixed in the latest version of node-pool?

Thanks!

PS: Similar issue is found in sequelize repo -> sequelize/sequelize#10443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant