背景:MongoDB v4.2.7
错误:OperationFailed: Sort operation used more than the maximum 33,554,432 bytes of RAM. Add an index, or specify a smaller limit.’ on server
修改:增加 sort memory
1. 查询现有配置
db.adminCommand({getParameter: ‘*‘})
2. 更新配置
db.adminCommand({"setParameter":1,"internalQueryExecMaxBlockingSortBytes":335544320})
参考资料
https://mobilemonitoringsolutions.com/memory-errors-mongodb-resolve/