MongoDB Cursor Not Found

Viewed 17113

I am using mongodb's (mongoose module) with node js
and i am processing around 1,00,00,000 documents in (1000 bunch each) using limit and skip functionalities.
my processing fine but after some time it gives me an error.

{ MongoError: Cursor not found, cursor id: 62783806111
    at Function.MongoError.create (/home/admin/Pictures/duplicayProj1/node_modules/mongoose/node_modules/mongodb-core/lib/error.js:31:11)
    at /home/admin/Pictures/duplicayProj1/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:483:72
    at authenticateStragglers (/home/admin/Pictures/duplicayProj1/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:429:16)
    at Connection.messageHandler (/home/admin/Pictures/duplicayProj1/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:463:5)
    at Socket.<anonymous> (/home/admin/Pictures/duplicayProj1/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:339:20)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at addChunk (_stream_readable.js:252:12)
    at readableAddChunk (_stream_readable.js:239:11)
    at Socket.Readable.push (_stream_readable.js:197:10)
    at TCP.onread (net.js:589:20)
  name: 'MongoError',
  message: 'Cursor not found, cursor id: 62783806111',
  ok: 0,
  errmsg: 'Cursor not found, cursor id: 62783806111',
  code: 43 }

can any one tell me what's the actual problem because i am not using any keywords matches with cursor.
Thanks in advance

1 Answers

This normally happens because your cursor timeouts if it is idle for too long. Check out noCursorTimeout. Just make sure you close the cursor when you are finished.

Related