Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/hungry-planets-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/service-module-mongodb': patch
---

Increase connection timeouts for MongoDB "Test Connection".
5 changes: 3 additions & 2 deletions modules/module-mongodb/src/module/MongoModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ export class MongoModule extends replication.ReplicationModule<types.MongoConnec
const connectionManager = new MongoManager(normalizedConfig, {
// Use short timeouts for testing connections.
// Must be < 30s, to ensure we get a proper timeout error.
socketTimeoutMS: 1_000,
serverSelectionTimeoutMS: 1_000
// It must be large enough to cover the high latency of testing connections across regions
socketTimeoutMS: 3_000,
serverSelectionTimeoutMS: 5_000
});
try {
await checkSourceConfiguration(connectionManager);
Expand Down