原文:Query failed with error code 96 and error message 'Executor error during find command: OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smal

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

2019-06-10 16:59 0 982 推荐指数:

查看详情

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
mongodb Sort operation used more than the maximum 33554432 bytes of RAM

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

Sun Jun 24 17:20:00 CST 2018 0 991
clang: error: linker command failed with exit code 1

之前在 macOS 10.13 上参照官方文档 build 了 LLVM 和 Clang,而在使用 clang++ 编译时有时会遇到如题的问题,具体报错信息如下: 原因是默认的 C++ runt ...

Mon Mar 25 19:35:00 CST 2019 0 1416
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM