Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2822

aws lambda mongo timeout randomly

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Lambda
    • Labels:
    • Environment:
      mongodb atlas, aws lambda js, connected via vpc peering

      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)

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            philipp@sambohl.de Philipp Sambohl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: