Monday, 14 September 2020

Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.

 

Error: 

Error: error: {

        "ok" : 0,

        "errmsg" : "Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.",

        "code" : 96,

        "codeName" : "OperationFailed"

}


Solution: 

         when you execute query on large collection that time error will come. use limit() method to get data.

db.employees.find().sort({employee_id: 1 } ).limit(1)




No comments:

Post a Comment

work on autovacuum postgreSQL parameter

 In This blog, we are discussing the auto vacuum parameter on a small scale. we will understand the below parameters and will see how to mod...