/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/sdam/topology.js:303
                const timeoutError = new error_1.MongoServerSelectionError(`Server selection timed out after ${options.serverSelectionTimeoutMS} ms`, this.description);
                                     ^

MongoServerSelectionError: Server selection timed out after 30000 ms
    at Topology.selectServer (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/sdam/topology.js:303:38)
    at async executeOperation (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/operations/execute_operation.js:101:20)
    at async FindCursor._initialize (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/find_cursor.js:51:26)
    at async FindCursor.cursorInit (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:471:27)
    at async FindCursor.fetchBatch (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:503:13)
    at async FindCursor.next (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:228:13)
    at async [Symbol.asyncIterator] (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:159:34)
    at async FindCursor.toArray (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:284:26)
    at async /home/navantis/api.navantispharma.com/index.js:115:19 {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    servers: Map(3) {
      'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017' => ServerDescription {
        address: 'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017',
        type: 'RSSecondary',
        hosts: [
          'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017',
          'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017',
          'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017'
        ],
        passives: [],
        arbiters: [],
        tags: {
          provider: 'AWS',
          availabilityZone: 'aps1-az2',
          cacheState: 'READY',
          diskState: 'READY',
          workloadType: 'OPERATIONAL',
          region: 'AP_SOUTH_1',
          nodeType: 'ELECTABLE'
        },
        minWireVersion: 0,
        maxWireVersion: 25,
        roundTripTime: 62.3,
        minRoundTripTime: 61,
        lastUpdateTime: 1243027801,
        lastWriteDate: 2026-05-19T12:15:52.000Z,
        error: null,
        topologyVersion: {
          processId: ObjectId { buffer: [Buffer [Uint8Array]] },
          counter: 5
        },
        setName: 'atlas-cwsx4y-shard-0',
        setVersion: 1,
        electionId: null,
        logicalSessionTimeoutMinutes: 30,
        primary: 'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017',
        me: 'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017',
        '$clusterTime': {
          clusterTime: Timestamp { low: 1, high: 1779192952, unsigned: true },
          signature: { hash: [Binary], keyId: [Long] }
        }
      },
      'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017' => ServerDescription {
        address: 'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        minRoundTripTime: 0,
        lastUpdateTime: 1243033929,
        lastWriteDate: 0,
        error: null,
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      },
      'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017' => ServerDescription {
        address: 'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017',
        type: 'RSSecondary',
        hosts: [
          'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017',
          'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017',
          'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017'
        ],
        passives: [],
        arbiters: [],
        tags: {
          region: 'AP_SOUTH_1',
          nodeType: 'ELECTABLE',
          cacheState: 'READY',
          workloadType: 'OPERATIONAL',
          availabilityZone: 'aps1-az1',
          diskState: 'READY',
          provider: 'AWS'
        },
        minWireVersion: 0,
        maxWireVersion: 25,
        roundTripTime: 61,
        minRoundTripTime: 61,
        lastUpdateTime: 1243032017,
        lastWriteDate: 2026-05-19T12:16:02.000Z,
        error: null,
        topologyVersion: {
          processId: ObjectId { buffer: [Buffer [Uint8Array]] },
          counter: 9
        },
        setName: 'atlas-cwsx4y-shard-0',
        setVersion: 1,
        electionId: null,
        logicalSessionTimeoutMinutes: 30,
        primary: 'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017',
        me: 'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017',
        '$clusterTime': {
          clusterTime: Timestamp { low: 1, high: 1779192962, unsigned: true },
          signature: { hash: [Binary], keyId: [Long] }
        }
      }
    },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: 'atlas-cwsx4y-shard-0',
    maxElectionId: ObjectId {
      buffer: Buffer(12) [Uint8Array] [
        127, 255, 255, 255, 0,
          0,   0,   0,   0, 0,
          1,  69
      ]
    },
    maxSetVersion: 342,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: 30
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {}
}

Node.js v18.20.8
/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/sdam/topology.js:303
                const timeoutError = new error_1.MongoServerSelectionError(`Server selection timed out after ${options.serverSelectionTimeoutMS} ms`, this.description);
                                     ^

MongoServerSelectionError: connection timed out
    at Topology.selectServer (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/sdam/topology.js:303:38)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:538:9)
    at process.processTimers (node:internal/timers:512:7)
    at async executeOperation (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/operations/execute_operation.js:101:20)
    at async FindCursor._initialize (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/find_cursor.js:51:26)
    at async FindCursor.cursorInit (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:471:27)
    at async FindCursor.fetchBatch (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:503:13)
    at async FindCursor.next (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:228:13)
    at async [Symbol.asyncIterator] (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cursor/abstract_cursor.js:159:34) {
  reason: TopologyDescription {
    type: 'ReplicaSetNoPrimary',
    servers: Map(3) {
      'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017' => ServerDescription {
        address: 'ac-tim2hj3-shard-00-00.fxqg8by.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        minRoundTripTime: 0,
        lastUpdateTime: 1817589849,
        lastWriteDate: 0,
        error: MongoNetworkTimeoutError: connection timed out
            at connectionFailureError (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:355:20)
            at TLSSocket.<anonymous> (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:269:43)
            at Object.onceWrapper (node:events:631:28)
            at TLSSocket.emit (node:events:517:28)
            at Socket._onTimeout (node:net:598:8)
            at listOnTimeout (node:internal/timers:569:17)
            at process.processTimers (node:internal/timers:512:7) {
          [Symbol(errorLabels)]: Set(2) { 'ResetPool', 'InterruptInUseConnections' },
          [cause]: undefined
        },
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      },
      'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017' => ServerDescription {
        address: 'ac-tim2hj3-shard-00-01.fxqg8by.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        minRoundTripTime: 0,
        lastUpdateTime: 1817621036,
        lastWriteDate: 0,
        error: MongoNetworkTimeoutError: connection timed out
            at connectionFailureError (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:355:20)
            at TLSSocket.<anonymous> (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:269:43)
            at Object.onceWrapper (node:events:631:28)
            at TLSSocket.emit (node:events:517:28)
            at Socket._onTimeout (node:net:598:8)
            at listOnTimeout (node:internal/timers:569:17)
            at process.processTimers (node:internal/timers:512:7) {
          [Symbol(errorLabels)]: Set(2) { 'ResetPool', 'InterruptInUseConnections' },
          [cause]: undefined
        },
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      },
      'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017' => ServerDescription {
        address: 'ac-tim2hj3-shard-00-02.fxqg8by.mongodb.net:27017',
        type: 'Unknown',
        hosts: [],
        passives: [],
        arbiters: [],
        tags: {},
        minWireVersion: 0,
        maxWireVersion: 0,
        roundTripTime: -1,
        minRoundTripTime: 0,
        lastUpdateTime: 1817589849,
        lastWriteDate: 0,
        error: MongoNetworkTimeoutError: connection timed out
            at connectionFailureError (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:355:20)
            at TLSSocket.<anonymous> (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:269:43)
            at Object.onceWrapper (node:events:631:28)
            at TLSSocket.emit (node:events:517:28)
            at Socket._onTimeout (node:net:598:8)
            at listOnTimeout (node:internal/timers:569:17)
            at process.processTimers (node:internal/timers:512:7) {
          [Symbol(errorLabels)]: Set(2) { 'ResetPool', 'InterruptInUseConnections' },
          [cause]: undefined
        },
        topologyVersion: null,
        setName: null,
        setVersion: null,
        electionId: null,
        logicalSessionTimeoutMinutes: null,
        primary: null,
        me: null,
        '$clusterTime': null
      }
    },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: 'atlas-cwsx4y-shard-0',
    maxElectionId: ObjectId {
      buffer: Buffer(12) [Uint8Array] [
        127, 255, 255, 255, 0,
          0,   0,   0,   0, 0,
          0,   5
      ]
    },
    maxSetVersion: 1,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined,
  [Symbol(errorLabels)]: Set(0) {},
  [cause]: MongoNetworkTimeoutError: connection timed out
      at connectionFailureError (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:355:20)
      at TLSSocket.<anonymous> (/home/navantis/nodevenv/api.navantispharma.com/18/lib/node_modules/mongodb/lib/cmap/connect.js:269:43)
      at Object.onceWrapper (node:events:631:28)
      at TLSSocket.emit (node:events:517:28)
      at Socket._onTimeout (node:net:598:8)
      at listOnTimeout (node:internal/timers:569:17)
      at process.processTimers (node:internal/timers:512:7) {
    [Symbol(errorLabels)]: Set(2) { 'ResetPool', 'InterruptInUseConnections' },
    [cause]: undefined
  }
}

Node.js v18.20.8
