-
Type: Task
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Lambda
-
Environment:mongodb atlas, aws lambda js, connected via vpc peering
-
Empty show more show less
I'am getting some timeouts in my lambdas. Interestingly only in the lambda, where we are using multi-document transactions and not every time. After the error, the lambda simply gets trigged again by the sqs and the it is running fine.
If the errors gets thrown, it happens really fast, often under 30ms.
The query is a simple findOne on an index field.
Another strange thing, is that all my different transactions in the lambdas, have the same clientSession id. Is this normal?
This are my settings:
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
This is the error:
MongoNetworkTimeoutError: connection timed out
at connectionFailureError (/var/task/node_modules/mongodb/lib/core/connection/connect.js:342:14)
at TLSSocket.<anonymous> (/var/task/node_modules/mongodb/lib/core/connection/connect.js:310:16)
at Object.onceWrapper (events.js:421:28)
at TLSSocket.emit (events.js:315:20)
at TLSSocket.EventEmitter.emit (domain.js:482:12)
at TLSSocket.Socket._onTimeout (net.js:481:8)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)