Skip to content

Commit

Permalink
fix(core): update socket timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Nov 7, 2024
1 parent 9a839ae commit 77cd00a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/api/src/servers/exporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion core/api/src/services/mongodb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 77cd00a

Please sign in to comment.