diff --git a/lib/storage/mongo-storage.js b/lib/storage/mongo-storage.js index 632f1cfa82e..987e41ef67d 100644 --- a/lib/storage/mongo-storage.js +++ b/lib/storage/mongo-storage.js @@ -24,10 +24,7 @@ function init(env, cb, forceNewConnection) { } console.log('Setting up new connection to MongoDB'); - const timeout = 10 * 1000; const options = { - connectTimeoutMS: timeout, - socketTimeoutMS: timeout, useNewUrlParser: true, useUnifiedTopology: true, }; @@ -38,7 +35,7 @@ function init(env, cb, forceNewConnection) { try { await mongo.client.connect(); - console.log('Successfully established a connected to MongoDB'); + console.log('Successfully established connection to MongoDB'); const dbName = mongo.client.s.options.dbName; mongo.db = mongo.client.db(dbName); @@ -69,7 +66,7 @@ function init(env, cb, forceNewConnection) { setTimeout(connect_with_retry, timeout, i + 1); if (i == 1) cb(new Error('MongoDB connection failed! Double check the MONGODB_URI setting in Heroku.'), null); } else { - cb(new Error('MONGODB_URI ' + env.storageURI + ' seems invalid: ' + err.message)); + cb(new Error('MONGODB_URI seems invalid: ' + err.message)); } } };