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

noCursorTimeout does not seem to for find()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.4
    • Affects Version/s: 3.6.2
    • Component/s: None
    • Labels:

      Running latest NodeJS driver (3.6.2) with MongoDB 4.4.1 Community Replica Set on an Ubuntu 20.04 system.

      We run a query with a cursor that looks like this:

      let cursor = await mycoll.find(query, { sort: { some_field: 1 }, timeout: false, noCursorTimeout: true }); 
      

      Followed by a loop that does cursor.next() which queues up promises and runs groups of very complex migration processes (which read many different collections), which can take a while to complete for each group.

      We get errors like this:

      MongoError: cursor id 1538160812525869483 not found

      Which are usually an indication of the cursor timing out....however, we did specify noCursorTimeout on the query, so can only conclude that the NodeJS driver is not correctly implementing or passing through the noCursorTimeout parameter.

      If we reduce the size of the group so that the cursor is polled a bit more often it seems to resolve the issue, but we believe there is a bug in the NodeJS driver that should be resolved.

            Assignee:
            eric.adum@mongodb.com Eric Adum (Inactive)
            Reporter:
            ataramina@shorecg.com Andrzej Taramina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: