node.js - Mongo Timed Out While Many Queries in Nodejs -
i facing problem while executing huge number (thousands) of async queries mongo getting following error
throw er; // unhandled 'error' event ^ mongoerror: connection 4 localhost:27017 timed out i tried different values of connection options increasing , decreasing them still getting error
the connection code part in app.js
var mongooptions = { sockettimeoutms: 0, connecttimeoutms: 0, keepalive: true, reconnecttries: 30, poolsize: 10 }; mongoose.connect(config.mongo_db_moj_connection, mongooptions).then(function () { console.log('connected mongo'); }, function (err) { //err handle });
try
{ keepalive: 0, connecttimeoutms: 0}
Comments
Post a Comment