原文: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