diff --git a/core/api/src/servers/exporter.ts b/core/api/src/servers/exporter.ts index 963632b127..1a8b8142cc 100644 --- a/core/api/src/servers/exporter.ts +++ b/core/api/src/servers/exporter.ts @@ -213,7 +213,7 @@ const main = async () => { setupMongoConnection({ syncIndexes: false, - options: { readPreference: "secondaryPreferred", socketTimeoutMS: 120000 }, + options: { readPreference: "secondaryPreferred", socketTimeoutMS: 150000 }, }) .then(() => main()) .catch((err) => logger.error(err)) diff --git a/core/api/src/services/mongodb/index.ts b/core/api/src/services/mongodb/index.ts index 4a6c01df47..dbc8ee99df 100644 --- a/core/api/src/services/mongodb/index.ts +++ b/core/api/src/services/mongodb/index.ts @@ -30,7 +30,7 @@ const DEFAULT_MONGODB_OPTIONS: mongoose.ConnectOptions = { minPoolSize: 15, maxConnecting: 5, // Maximum number of concurrent connection attempts - socketTimeoutMS: 60000, // Close sockets after 60 seconds of inactivity + socketTimeoutMS: 120000, // Close sockets after 120 seconds of inactivity connectTimeoutMS: 15000, // Give up initial connection after 15 seconds serverSelectionTimeoutMS: 15000, // Keep trying to send operations for 15 seconds