Skip to content

Commit

Permalink
fix(core): update exporter db connection settings (#4660)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi authored Nov 18, 2024
1 parent 561fa1b commit ee74666
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 ee74666

Please sign in to comment.