Memory limit error when doing sort query

I am getting error while doing a sort query

MongoDB Enterprise > db.residents.find().sort({“age”:1,“residentname”:1})
Error: error: {
“ok” : 0,
“errmsg” : “Executor error during find command :: caused by :: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit.”,
“code” : 96,
“codeName” : “OperationFailed”
}

can anyone suggest , how i can check the existing limit of memory for any sort operation in mongoDb as same i do not see in mongodb configuration file and how i can change the same

Why do you want to increase 32MB limit?
Check if index is missing

You can increase the default limit
Override the default 32MB limit on an in-memory sort - MongoDB

use admin
db.runCommand( { getParameter : 1, “internalQueryExecMaxBlockingSortBytes” : 1 } )

db.adminCommand({setParameter: 1, internalQueryExecMaxBlockingSortBytes: 335544320})
With the above command RAM limit changed to 320 MB

Thanks Ram , Can you tell if we have any command in mongodb to check the default settings ( specially related to configurations ( like memory configuration )

Thanks
Arpit