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

Server selection timed out

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.4
    • Affects Version/s: 3.3.0
    • Component/s: None
    • Environment:
      Docker
      Mongo 4

      We are getting a timeout error

      MongoTimeoutError: Server selection timed out after 30000 ms
      at Timeout.setTimeout [as _onTimeout](/usr/src/app/node_modules/mongodb/lib/core/sdam/topology.js:850:16)
      at ontimeout (timers.js:436:11)
      at tryOnTimeout (timers.js:300:5)
      at listOnTimeout (timers.js:263:5)
      at Timer.processTimers (timers.js:223:10)
      

      We are doing a replicaset connection using the nodejs dirver in version 3.3.0 with thoses options

      { useNewUrlParser: true, useUnifiedTopology: true }
      

      I quickly read that it can be due to the `useUnifiedTopology`

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            antoine@ajouve.com Antoine Jouve
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: