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

TypeError: Cannot read property 'nextBatch' of undefined

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

      We are in the process of moving from a single replica set to a sharded database. After the converstion, we've started intermittently seeing this error:

      TypeError: Cannot read property 'nextBatch' of undefined at Response.parse (/usr/src/app/node_modules/mongodb-core/lib/connection/commands.js:488:32) at /usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:564:19 at authenticateStragglers (/usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:516:16) at Connection.messageHandler (/usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:552:5) at emitMessageHandler (/usr/src/app/node_modules/mongodb-core/lib/connection/connection.js:309:10) at Socket.<anonymous> (/usr/src/app/node_modules/mongodb-core/lib/connection/connection.js:452:17) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10)
      

       

      Important details:

      • These errors only occur on the one collection that is actually being sharded. 
      • The initial rebalance is still under way (looks like it will take many days to complete)
      • The queries that are failing are against a 2dsphere index
      • The queries that are failing are using the following settings
        • `raw: true`
        • `noCursorTimeout: true`
        • `batchSize: 500`
      • Mongo v3.6.3
      • Node driver v3.0.10
      • Node v10.4.1 (running on alpine)

       

      What other information can I provide? 

            Assignee:
            katherine.walker@mongodb.com Katherine Walker (Inactive)
            Reporter:
            herbrandson Eric Herbrandson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: