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.
Here are the Ruby tickets: RUBY-1312, RUBY-1318
I was able to reproduce this with the following Ruby code:
https://gist.github.com/estolfo/f6a46b68fdf3db9be102ba2236e7abd5
This is the driver log:
https://gist.github.com/estolfo/1bc93c544e25b71678d9389a306f5292
- depends on
-
SERVER-36332 CursorNotFound error in GetMore on a secondary with sessions
- Closed
- duplicates
-
SERVER-34810 Session cache refresh can erroneously kill cursors that are still in use
- Closed