原文:mongodb Sort operation used more than the maximum 33554432 bytes of RAM

在 mongo 使用过程中遇到了一个问题,需求就是要对mongo 库中查询到数据进行分页,mongo库我们知道都会存储大容量的数据,如果库里数据多的话,这时会报一个Query failed with error code and error message Executor error during find command:OperationFailed: Sort operation used ...

2018-06-24 09:20 0 991 推荐指数:

查看详情

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

  按照错误提示,知道这是排序的时候报的错,因为 mongo 的 sort 操作是在内存中操作的,必然会占据内存,同时mongo 内的一个机制限制排序时最大内存为 32M,当排序的数据量超过 32M,就会报上面的这个错,解决办法就像上面提示的意思,一是加大 mongo 的排序内存,这个一般是运维 ...

Fri May 11 18:59:00 CST 2018 0 1352
Query failed with error code 96 and error message 'Executor error during find command: OperationFailed: Sort operation used more than the maximum

首先问题很明确,当我对一个没有建索引的字段做find,然后做sort的时候,可能触发sort的size的32MB限制,而mongodbsort操作是把数据拿到内存中再进行排序的,为了节约内存,默认给sort操作限制了最大内存为32Mb,当数据量越来越大直到超过32Mb的时候就自然抛出异常 ...

Tue Jun 11 00:59:00 CST 2019 0 982
More than the maximum number of request parameters

前些时间,我们的的一个管理系统出现了点问题,原本运行的好好的功能,业务方突然讲不行了,那个应用已经运行了好多年了,并且对应的代码最近谁也没改动过,好奇怪的问题,为了解决此问题,我们查看了日志,发现请求 ...

Sun Aug 06 00:26:00 CST 2017 0 1483
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM