[SOLVED] App keeps crashing after 30 minutes on NodeChef

When I deploy my Meteor app to NodeChef it keeps crashing after 30-40 minutes.
It’s a web application, and it keeps on crashing without me doing something to interact with it. I use SyncedCron. If I restart it, it crashes after 30 minutes.

I suspect it has something to do with the way it interacts with the Mongo DB. This is the error from the log I get every time:

 /bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:123 
process.nextTick(function() { throw err; }); 
^ 

TypeError: callback is not a function 
at /bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cursor.js:779:15 
at /bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cursor.js:745:22 
at handleCallback (/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:120:56) 
at /bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cursor.js:681:20 
at handleCallback (/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/cursor.js:171:5) 
at /bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/cursor.js:585:22 
at queryCallback (/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/cursor.js:212:16) 
at /bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18 
at nextTickCallbackWith0Args (node.js:489:9)

Any of you guys that can point me in the right direction on what the issue might be? It works like a charm on my local test machine but crashes on NodeChef.

Found the problem. Always check the versions of your databases. :joy:

1 Like