原文:[MongoDB] - 對於"OperationFailed: Sort operation used more than the maximum 33554432 bytes of RAM"問題的優化

背景:MongoDB v . . 錯誤:OperationFailed: Sort operation used more than the maximum , , bytes of RAM. Add an index, or specify a smaller limit. on server 修改:增加 sort memory 修改當前運行時 重啟MongoDB失效 . 查詢現有配置 . 更新 ...

2020-09-23 12:46 0 444 推薦指數:

查看詳情

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-2026 CODEPRJ.COM