mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
add mongodb connection options #3670
increase reconnect tries add keepAlive setting set autoReconnect to true, should be on by default
This commit is contained in:
@@ -84,6 +84,9 @@
|
||||
var connOptions = {
|
||||
server: {
|
||||
poolSize: parseInt(nconf.get('mongo:poolSize'), 10) || 10,
|
||||
socketOptions: { autoReconnect: true, keepAlive: nconf.get('mongo:keepAlive') || 0 },
|
||||
reconnectTries : 3600,
|
||||
reconnectInterval : 1000,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user