Wednesday, 19 April 2017

KeystoneJS: Upgraded to 4.0.0-beta5 - MongoError pool destroyed

I am attempting to upgrade to KeystoneJS 4.0.0-beta5 but seem to be running into an issue with MongoDB.

My application overall seems to be functioning correctly except randomly I will get the following error in my console:

Error thrown for request: /
MongoError: pool destroyed
    at Pool.write (/var/www/node_modules/mongodb-core/lib/connection/pool.js:880:12)
    at Cursor._find (/var/www/node_modules/mongodb-core/lib/cursor.js:287:22)
    at nextFunction (/var/www/node_modules/mongodb-core/lib/cursor.js:585:10)
    at Cursor.next [as _next] (/var/www/node_modules/mongodb-core/lib/cursor.js:693:3)
    at nextObject (/var/www/node_modules/keystone/node_modules/mongodb/lib/cursor.js:671:8)
    at Cursor.next (/var/www/node_modules/keystone/node_modules/mongodb/lib/cursor.js:261:12)
    at findOne (/var/www/node_modules/keystone/node_modules/mongodb/lib/collection.js:1404:10)
    at Collection.findOne (/var/www/node_modules/keystone/node_modules/mongodb/lib/collection.js:1390:44)
    at tryCatcher (/var/www/node_modules/bluebird/js/release/util.js:16:23)
    at ret [as findOneAsync] (eval at <anonymous> (/var/www/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:14:23)
    at /var/www/node_modules/connect-mongo/src/index.js:195:48
    at tryCatcher (/var/www/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/var/www/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/var/www/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromiseCtx (/var/www/node_modules/bluebird/js/release/promise.js:606:10)
    at Async._drainQueue (/var/www/node_modules/bluebird/js/release/async.js:138:12)
    at Async._drainQueues (/var/www/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/var/www/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

I have attempted to update MongoDB and all packages in KeystoneJS but have had no luck. I have also attempted to remove the session store and use a different config but no luck.

My database setup is a bit unique in that I am using a replicaset with KeystoneJS but have never had any problems in the past.

Does anyone have any ideas? Not sure if this is possible a bug in beta 5 but I am going to try downgrading to beta 4 right now.

Thanks



via Dani

No comments:

Post a Comment