CursorNotFound) Cursor not found (namespace: 'dbName.collection', id: 885805460243113719)

Following is the code for fetching the results from the db providing collection, filter query, sorting query and number of limit.

func DBFetch(collection *mongo.Collection, filter interface{}, sort interface{}, limit int64) ([]bson.M, error) {
	findOptions := options.Find()
	cursor, err := collection.Find(context.Background(), filter, findOptions)
	var result []bson.M
	if err != nil {
		return nil, err
	if err = cursor.All(context.Background(), &result); err != nil {
		return nil, err
	return result, nil
  1. I am using mongo-go driver version 1.8.2
  2. mongodb community version 4.4.7 sharded mongo with 2 shards
  3. Each shard is with 30 CPU in k8 with 245Gb memory having 1 replica
  4. 200 rpm for the api
  5. Api fetches the data from mongo and format it and the serves it
  6. We are reading and writing both on primary.
  7. Heavy writes occur every hour approximately.
  8. Getting timeouts in milliseconds ( 10ms-20ms approx. )