Skip to content

Commit

Permalink
fix(core): update exporter db connection settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Nov 18, 2024
1 parent 561fa1b commit e626366
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/api/src/servers/exporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ const main = async () => {

setupMongoConnection({
syncIndexes: false,
options: { readPreference: "secondaryPreferred", socketTimeoutMS: 150000 },
options: {
retryReads: false, // Disable retries to prevent hanging on slow/complex queries
readConcern: { level: "majority" }, // Read from majority-committed data
readPreference: "secondaryPreferred", // Exporter only reads data
socketTimeoutMS: 300000, // 5 mins
},
})
.then(() => main())
.catch((err) => logger.error(err))
Expand Down

0 comments on commit e626366

Please sign in to comment.