I’ve had two Ruby tickets reporting that a user gets a cursor id not found error with the latest version of the server and the Ruby driver. I’ve been able to reproduce it (see below for code and logs).
Here are the details:
- The query is done with read preference secondaryPreferred
- The query has noCursorTimeout set to true
- The query uses an implicit session
- The sequence of operations is: find (success), getmore (success), getmore (failure/no cursor id found)
- As the user iterates over the query results, there is sometimes a few minutes between getMore requests. This value has been 7 minutes and 10 minutes.
I confirmed that:
- The driver is indeed setting noCursorTimeout on the query
- The same lsid is being used for the original find and following getMores
- Neither the cursor nor the session are being prematurely ended before the getMore failure. (no endSessions commands or killCursors commands found in the logs)
I can provide the user's primary and secondary logs, as well as application logs.
I was able to reproduce this with the following Ruby code:
This is the driver log: