1. 程式人生 > >[Mongo] error inserting documents: BSONObj size is invalid (mongoimport mongorestore 資料備份恢復)

[Mongo] error inserting documents: BSONObj size is invalid (mongoimport mongorestore 資料備份恢復)

解決辦法如下, ./mongoimport -port 6066 -d xxx -c xxx --batchSize=10 /root/mong_data/test/xxx

原因轉自 http://blog.csdn.net/xiaobluesky/article/details/50216927

從MONGODB2.6升級到MONGODB3.0.7,從MONGODB3.0 RESTORE 2.6DUMP的檔案時,報如下錯誤:2015-11-05T10:31:30.131+0800 I NETWORK [conn12] AssertionException handling request, closing client connection: 10334 BSONObj size: 17794400 (0x10F8560) is invalid. Size must be between 0 and 16793600(16MB) GOOGLE之後看到解決方案 I had same problem with mongo 3.0.0 and 3.1.9 with relatively small database (12GB). After wasting roughly 4 hours of time on this I found workaround using hidden parameter mongorestore --batchSize=10 where number varies depending on nature of your data. Start with 1000.

--------------------------------------------------------------------------------------------

alternatively you can use the 3.0.7 version of mongorestore as long as you pass a smallish batch size. The actual value depends on your document sizes, so I can't give you an actual recommended value. The default, what's being used if you don't specify anything, is 10,000.You could try --batchSize=1000 and see if that works for you. If that still fails, you could halve that value until it succeeds.

--------------------------------------------------------------------------------------------------------------------------------

mongorestore send insert commands by batch in a {"applyOps", entries} document. This document is (AFAIK) limited to 16MB just like any other document.According to the sources there are "pathological cases where the array overhead of many small operations can overflow the maximum command size". The variable oplogMaxCommandSize is used to help mongorestore to not fail on such cases. It was raised to 16.5M at some point during the 3.0... development. That was too optimistic. It was lowered back to 8M later (JIRA TOOLS-754).If you need to, you may adjust that value yourself according to your needs. And then recompile the tools.

-------------------------------------

官方BUG連結:https://jira.mongodb.org/browse/TOOLS-939

相關推薦

[Mongo] error inserting documents: BSONObj size is invalid (mongoimport mongorestore 資料備份恢復)

解決辦法如下, ./mongoimport -port 6066 -d xxx -c xxx --batchSize=10 /root/mong_data/test/xxx 原因轉自 http://blog.csdn.net/xiaobluesky/article/details/50216927

記解決一次“HTTP Error 400. The request URL is invalid”的錯誤

cat 2.0 get run 情況 -i tle 錯誤信息 重啟 今天將圖片服務切到使用了cdn的機器上面去,然後就部分圖片報如下圖錯誤“HTTP Error 400. The request URL is invalid” 看到這種錯誤信息,一般的開發者心中可能會猜測

Yii2.0中(Hash is invalid error)驗證錯誤

yii2 fun 輸入 方式 swd 數據庫 null 數據 字符 老項目數據遷移到Yii2.0後,密碼仍使用md5加密。但是通過yii2.0的驗證類的validatePassword($password)函數驗證始終返回false: public function va

解決insmod: error inserting 'hello.ko': -1 Invalid module format

實現 功能:在PC的LINUX實現驅動測試,不用在2440上測試 解決insmod: error inserting ‘hello.ko’: -1 Invalid module format 第一次寫Linux驅動,環境搭建了好久,第一次可能是由於GCC的版本問

insmod: error inserting '***.ko': -1 Invalid parameters 真正原因以及解決方法

------- Comment #1 From Roland Kletzing 2009-01-17 02:44:19 ------- what about using modprobe instead ? (as this looks in modules.dep to find the depende

java.lang.IllegalArgumentException: sheetName '' is invalid

cab val nbsp 數據庫查詢 work base pac ava bst 1、錯誤描寫敘述java.lang.IllegalArgumentException: sheetName ‘‘ is invalid - character count MUST be g

微信圖片分享遇到 checkArgs fail, thumbData is invalid

!= 得到 mat stat 轉換成 new ack turn arr 該問題主要是微信圖片限制32K以內的原因,可將bmpToByteArray方法進行進行改寫。 原方法是: /** * 得到Bitmap的byte * @autho

Android 編譯錯誤——布局 Error parsing XML: not well-formed (invalid token)

XML width 文件 format source 註意 for 編碼 invalid 在修改了Android布局文件後,編譯出現Error parsing XML: not well-formed (invalid token)。 首先先排查xml文件的編碼格式是否

暫時解決java.lang.IllegalStateException: It is invalid to call isReady() when the response has not been put into non-blocking mode

服務器 lose img () arguments it is 分享 exc 解決 環境: 本機-apache-tomcat-9.0.0.M21 服務器-apache-tomcat-9.0.0.M9 錯誤復盤: 最初不知道是tomcat版本解決的,實現了

Error in library(e1071) : there is no package called 'e1071'

library packages 學習R語言時,在安裝包的時候都是正常的,但當導入包的時候通常會出現下面的情況:libaray(e1071)Error in library(e1071) : there is no package called ‘e1071’網上有些說是包沒有裝全,需要安裝依賴包 ,

Android source code compile error: “Try increasing heap size with java option '-Xmx<size>'”

eap pre ted str tools courier odi xmx tier export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g" ./prebui

嚴重: Error in dependencyCheck java.io.IOException: invalid header field(tomcat啟動成功可是訪問web項目404錯誤)

check man 空格 .net tle http tom 空行 parent tomcat啟動的時候出現 嚴重: Error in dependencyCheck java.io.IOException: invalid header field

docker報Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.19)

amd64 client export mit als 大堆 server rim rime docker version Client: Version: 17.05.0-ce API version: 1.24 (downgraded from 1.29)

BCB ERROR:[Linker Error] 'XXX.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

cor coff 調用 spa info .lib ins col 編譯報錯 今天C++builder 導入 gts .lib (gts.dll)庫文件 編譯報錯: [Linker Error] ‘D:\...\V4.05.007.1000-20161028\GTS.LI

Error:Minimum supported Gradle version is 2.14.1. Current version is 2.10.原因分析和解決。

圖片 幫助 url err ... tle IT .net fcm 最近和主管一起開發項目一直出現這個問題: Error:Minimum supported Gradle version is 2.14.1. Current version is 12.10. If usi

樹莓派apt-get The value 'stable' is invalid for APT 錯誤

ble done err ava AC sources lis ali reading 對apt-get進行任何操作都會報錯: pi@raspberrypi:~ $ sudo apt-get upgrade Reading package lists... Done E:

idea報錯:Error running $classname: Command line is too long. Shorten command line for $classname.

9.png rop line too long component 我只 ima bsp 選擇 Command line is too long 打印的變量太長了,超過了限制,這都會報錯...我只想知道idea基於什麽原理會報這個錯... 解決 1.按照提示修改該類的

JSP報錯The value for the useBean class attribute *** is invalid.

再次 attribute use 基本 sdn 正常 沒有 class art 環境:IDEA+Tomcat9+JDK1.8 在前期學習時,環境一直能夠“正常”使用,實際上環境並沒有完全搭建成功。 推薦: https://blog.csdn.net/lw_power/art

The MAC is invalid

地址 有關 數據加密 ron 數據 app 個數 Opens 解密 在使用laravel框架進行網站開發時,我們會使用laravel的Crypt類對用戶的密碼進行加密來達到信息加密的目的,Crypt類會對數據加密時會依賴APP_KEY,所以當更換了APP_KEY時,再在登陸

ERROR--Dmaven.multiModuleProjectDirectory system propery is not set

eclipse中執行maven工程,報:-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match. 解決方