mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 09:39:23 +00:00
mongoose: increase keepAlive
This commit is contained in:
parent
c7fb69b530
commit
e47ae45f9f
1 changed files with 2 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ const IS_PROD = nconf.get('IS_PROD');
|
|||
mongoose.Promise = Bluebird;
|
||||
|
||||
let mongooseOptions = !IS_PROD ? {} : {
|
||||
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
|
||||
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
|
||||
replset: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
|
||||
server: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
|
||||
};
|
||||
let db = mongoose.connect(nconf.get('NODE_DB_URI'), mongooseOptions, (err) => {
|
||||
if (err) throw err;
|
||||
|
|
|
|||
Loading…
Reference in a new issue