[SERVER-61682] Cursor Not Found Created: 22/Nov/21  Updated: 27/Oct/23  Resolved: 22/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.24
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Karmela Meliza Deogracias Assignee: Unassigned
Resolution: Community Answered Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Hi! I hope you can help me with this issue. I've been investigating the cursor not found issue that we've been encountering in our staging environment. 

We have an API that returns a cursor not found issue starting at page 6 of the GET endpoint. 

We also have 2 other apis that has the same implementation of the pagination, but does not have the issue.   

We are using the following:

  • sharded mongo
  • enabled sticky sessions to mongos
  • node v8
  • mongoose 5.13.9
  • mongoDB v3.4.24

Please note that our lower environment has the same setup as our staging, but we don't have this issue. 

I've also tried replicating this issue by running the API in my local machine and connecting it to the staging database, but can't replicate the problem. 

I also noticed when the API's pod is restarted, the problem goes away but when the pod is 1 day old, it goes back. I've tried this multiple times.

I've been looking at this ticket: https://jira.mongodb.org/browse/SERVER-34810 but upgrading is not an option for us for now. 

This is the query that seems to have the problem:

2021-11-16T09:38:19.259+0000 I COMMAND [conn19900] command reekoh.system-logs command: find { find: "system-logs", filter: { $or: [ { account: "account-id" }, { account: "-System-" } ], type: { $ne: "Delete" } }, projection: { $sortKey: { $meta: "sortKey" } }, sort: { date: -1, _id: 1 }, limit: 125, shardVersion: [ Timestamp 1000|0, ObjectId('606a7ee012bf595aff09f264') ] } planSummary: IXSCAN { account: 1 } cursorid:237264813551 keysExamined:41684 docsExamined:41682 hasSortStage:1 numYields:326 nreturned:101 reslen:68395 locks:{ Global: { acquireCount: { r: 654 } }, Database: { acquireCount: { r: 327 } }, Collection: { acquireCount: { r: 327 } } } protocol:op_command 157ms



 Comments   
Comment by Dmitry Agranat [ 22/Nov/21 ]

Hi kmcdeogracias@gmail.com

As MongoDB 3.4 has reached EOL in September 2018, we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums.

If the discussion there leads you to suspect a bug in the MongoDB server under the supported versions, then we'd want to investigate it as a possible bug here in the SERVER project.

Regards,
Dima

Generated at Thu Feb 08 05:53:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.