mongodb runtime_error ai_generated true

CursorNotFound: cursor id not found on server

ID: mongodb/cursor-not-found

Also available as: JSON · Markdown
80%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
7 active

Root Cause

Cursor timed out or was killed during iteration.

generic

Workarounds

  1. 88% success Use batched processing with limit/skip or change streams
  2. 85% success Set appropriate batchSize to reduce cursor lifetime

Dead Ends

Common approaches that don't work:

  1. Set noCursorTimeout on all cursors 82% fail

    Memory leak if cursors not explicitly closed

  2. Increase cursor timeout to hours 78% fail

    Server memory pressure