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