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 的排序內存,這個一般是運維來管,也有弊端,就是數據量如果再大,還要往上加。另一個辦法就是加索引,這個方法還是挺方便的。創建索引及時生效,不需要重啟服務。
下面記錄下 加大 mongo 的排序內存的方法,親測有效:
進入mongodb所在目錄下的bin目錄,運行mongo,運行db.adminCommand({setParameter:1, internalQueryExecMaxBlockingSortBytes:335544320}),即可將32MB的內存更改為320MB;
不推薦此種方法;
加索引的方法,博主並沒有親測,僅作參考:
對需要排序的字段建索引 db.stotal.ensureIndex({‘type‘: -1}),索引字段根據自己的時間情況定。
OperationFailed Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit
相關推薦
OperationFailed Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit
imu command mongo sed 大內存 gson style fan index 按照錯誤提示,知道這是排序的時候報的錯,因為 mongo 的 sort 操作是在內存中操作的,必然會占據內存,同時mongo 內的一個機制限制排序時最大內存為 32M,當排序的
MongoDB排序錯誤:Sort operation used more than the maximum 33554432 bytes of RAM
錯誤描述 我用如下命令查詢某一個鍵的最大值: db.video_info.find().sort({'vid':-1}) 出現如下錯誤: Error: error: { "ok" : 0, "errmsg" : "Executor error
tomcat server 報錯之 More than the maximum allowed number of cookies
int str sock lar time color errors round pin More than the maximum allowed number of cookies EVERE: Error processing request java.lang.
More than the maximum number of request parameters
必須 導致 png deb .cn 好的 attr sina ram 前些時間,我們的的一個管理系統出現了點問題,原本運行的好好的功能,業務方突然講不行了,那個應用已經運行了好多年了,並且對應的代碼最近誰也沒改動過,好奇怪的問題,為了解決此問題,我們查看了日誌,發現請求的參
While trying to acquire a needed new resource, we failed to succeed more than the maximum number of
出現如下錯誤,原因是資料庫驅動,我自己一直記著我的MySQL資料庫是8.0.13.版本,但是出學ssm配置pom.xml檔案的時候把資料庫驅動配置錯誤了。找了半天,後面神奇的突發奇想的覺得要看看驅動相容不? Type Exception Report Message Request pro
mysql報錯Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage
.cn nbsp 導致 variable ria sed size log more mysql報錯Multi-statement transaction required more than ‘max_binlog_cache_size‘ bytes of storage
It’s more than the music- a UX case study
It’s more than the music- a UX case studyNowadays, we can do anything from our cellphones. We can buy groceries, connect with people across the world, and
Line 10 exceeds the maximum line length of 80
image mage 進行 文件夾 ron lin 就是 js文件 文件中 在vue-cli的組件中,有一段較長的文字,ESLint報錯:Line 10 exceeds the maximum line length of 80 ,ESLint設置一行編碼最多不能超過80字
[HTML5] Add an SVG Image to a Webpage and Get a Reference to the Internal Elements in JavaScript
show acc ntb content open direct () ren for We want to show an SVG avatar of the patio11bot, so we‘ll do that in three ways: Using a
logstash報錯:Error: Your application used more memory than the safety cap of 1G
問題來源 logstash在資料量少的情況下,是正常抽取資料的,但當多臺伺服器一起啟動logstash去抽取大量資料的時候,logstash就會出現Your application used more memory than the safety cap of 1G的問題
Error:Makefile:452: target 'config' given more than once in the same rule
dep nor The rul 工具 sta const bsp 出現 在解壓的 linux2.6.15 文件夾下 make menuconfig 的時候出現下面的錯誤: Makefile:452: target ‘config‘ given more than
java SSM項目搭建-- The server time zone value '?й???????' is unrecognized or represents more than one time zone
數據庫連接字符串 項目搭建 more jdbc utc 出現 PE bean col 出現 錯誤 The server time zone value ‘?й???????‘ is unrecognized or represents more than one
Exception in thread “main” java.sql.SQLException: The server time zone value ‘?й???????’ is unrecognized or represents more than one time zone.
odin 異常 參數 執行 cif must ant -h base Exception in thread “main” java.sql.SQLException: The server time zone value ‘?й???????’ is unrecogniz
git配置中出現多個重復名字:More than one value for the key user.name
for val config repl -s user nvic -c 區域 #### 查看配置```git config --list``` #### 查看所有的名稱```git config --get-all user.name``` #### 查
The server time zone value 'EDT' is unrecognized or represents more than one time zone.
概要:測試伺服器遷移到虛擬機器,所有服務重灌後部署專案及服務,在啟動服務時報錯: The server time zone value 'EDT' is unrecognized or represents more than one time zone. 首先想到的是看看連線資料庫的u
mysql異常之: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
連線資料庫時顯示: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must con
解決The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone.
因專案用到mysql資料庫,在開發過程中遇到了mysql時差問題,在網上查了查原因,在jdbc資料庫連線的url上加上 &serverTimezone=GMT即可!!如果需要使用gmt+8時區,需要寫成GMT%2B8,否則會被解析為空。再一個解決辦
mysql的時區錯誤問題: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one
報錯日誌: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemExcept
ElasticSearch6.5.0 【Rejecting mapping update to [posts] as the final mapping would have more than 1 type】
今天想在一個Index上增加一個type,結果報錯 java.lang.IllegalArgumentException: Rejecting mapping update to [posts] as the final mapping would have more than 1 type: [do
[報錯解決]The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
報錯資訊: 在使用mysql-connector-java-6.0.6連線mysql資料庫的時候,出現了報錯:The server time zone value '�й���ʱ��' is unrecognized or represents more than one