Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): update socket timeout #4648

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading