mongodb
runtime_error
ai_generated
true
CursorNotFound: cursor id not found on server
ID: mongodb/cursor-not-found
80%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 7 | active | — | — | — |
Root Cause
Cursor timed out or was killed during iteration.
genericWorkarounds
-
88% success Use batched processing with limit/skip or change streams
-
85% success Set appropriate batchSize to reduce cursor lifetime
Dead Ends
Common approaches that don't work:
-
Set noCursorTimeout on all cursors
82% fail
Memory leak if cursors not explicitly closed
-
Increase cursor timeout to hours
78% fail
Server memory pressure