Skip to content

Node.js based forum software built for the modern web

increase poolSize to 10 from default 5

barisusaklic5f9a8a1115b
diff --git a/src/database/mongo.js b/src/database/mongo.js
index e67419d3e4..8e72e98cec 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -55,8 +55,13 @@
winston.error('Unable to initialize MongoDB! Is MongoDB installed? Error :' + err.message);
process.exit();
}
-
- mongoClient.connect('mongodb://'+ nconf.get('mongo:host') + ':' + nconf.get('mongo:port') + '/' + nconf.get('mongo:database'), function(err, _db) {
+ var connString = 'mongodb://'+ nconf.get('mongo:host') + ':' + nconf.get('mongo:port') + '/' + nconf.get('mongo:database');
+ var connOptions = {
+ server: {
+ poolSize: 10
+ }
+ };
+ mongoClient.connect(connString, connOptions, function(err, _db) {
if(err) {
winston.error("NodeBB could not connect to your Mongo database. Mongo returned the following error: " + err.message);
process.exit();