解决办法如下, ./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 数据备份恢复)的更多相关文章

  1. insmod: error inserting 'simp-blkdev.ko': -1 Invalid module format

    (一) 今天写了个块设备驱动例子,在虚拟机上加载模块insmod simp_blkdev.ko的时候,出现以下错误. insmod: error inserting 'simple-blk.ko': ...

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

    编译自己的内核模块后,insmod出现error:error inserting 'hello.ko': -1 Invalid module format 出现这种情况的原因是因为Makefile种使 ...

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

    在学习编写linux驱动程序的时候,一般都是从写一个helloworld的模块開始. 可是在编译完毕后,进行模块载入的时候,有时会出现例如以下错误: insmod: error inserting ' ...

  4. 空间索引网格大小无效的解决方法The spatial index grid size is invalid

    原名引至:http://www.cnblogs.com/linhugh/archive/2012/07/24/2606439.html   之前在做shp数据导入Geodatabase中时,程序运行出 ...

  5. PhpStorm和WAMP配置调试参数,问题描述Error. Interpreter is not specified or invalid. Press “Fix” to edit your project configuration.

    PhpStorm和WAMP配置调试参数 问题描述: Error. Interpreter is not specified or invalid. Press “Fix” to edit your p ...

  6. 502 Proxy Error The proxy server received an invalid response from an upstream server

    Proxy Error The proxy server received an invalid response from an upstream server. The proxy server ...

  7. IAR 编译错解决Error[e16]: Segment NEAR_Z (size: 0x16d align: 0) is too long for segment definition. At least 0x83 more bytes needed.

    Error[e16]: Segment NEAR_Z (size: 0x16d align: 0) is too long for segment definition. At least 0x83 ...

  8. PhpStorm和WAMP配置调试参数,问题描述Error. Interpreter is not specified or invalid. Press “Fix” to edit your project configuration.

    PhpStorm和WAMP配置调试参数,解决实际问题. 问题描述: Error. Interpreter is not specified or invalid. Press "Fix&qu ...

  9. linux环境,通过rpm删除mysql包,报错:error reading information on service mysqld: Invalid argument

    问题描述: 今天在做saltstack的练习,想要通过sls的方式,在远程进行mysql数据库的安装,发现无法通过service的方式启动数据库,然后就想给删除了重新进行安装,在通过rpm -e进行删 ...

随机推荐

  1. 无法创建链接服务器 "TEST" 的 OLE DB 访问接口 "OraOLEDB.Oracle" 的实例

    在使用SQLserver建立远程服务连接Oracle的时候出现先下面错误 出现这个错误,我找到最常见的两个原因 1.注册表 <1>按下WIN+R,打开“运行”窗口,输入“regedit”, ...

  2. odp.net以及oracle oledb安装

    连接Oracle数据库需要Oracle数据访问组件(ODAC). 1. 下载ODAC:http://www.oracle.com/technetwork/cn/database/windows/dow ...

  3. active-mq的使用

    1.下载ActiveMQ 去官方网站下载:http://activemq.apache.org/ 2.运行ActiveMQ 解压缩apache-activemq-5.5.1-bin.zip,然后双击a ...

  4. Extjs 4.2 grid 分页问题,点击下一页参数没带过去

    最初的store写法: var store = Ext.create('Ext.data.Store', { model: 'PKU',//这个地方CarPKU不是一个对象,而是一个类 remoteS ...

  5. Css compatibility

    http://meiert.com/en/indices/css-properties/ http://www.standardista.com/css3/css3-selector-browser- ...

  6. 屏蔽ios7中某个页面的默认手势滑回返回

    - (void)viewWillDisappear:(BOOL)animated {[super viewWillDisappear:YES];self.navigationController.in ...

  7. WPF 多线程处理(5)

    WPF 多线程处理(1) WPF 多线程处理(2) WPF 多线程处理(3) WPF 多线程处理(4) WPF 多线程处理(5) WPF 多线程处理(6) 项目的目录: 以下是FileStroage的 ...

  8. Careercup - Facebook面试题 - 4907555595747328

    2014-05-02 07:49 题目链接 原题: Given a set of n points (coordinate in 2d plane) within a rectangular spac ...

  9. BZOJ 3875: [Ahoi2014]骑士游戏 dp+spfa

    题目链接: 题目 3875: [Ahoi2014]骑士游戏 Time Limit: 30 Sec Memory Limit: 256 MB 问题描述 [故事背景] 长期的宅男生活中,JYY又挖掘出了一 ...

  10. Emmet快速编写CSS样式

    基本的CSS样式编写时,很多样式只需输入首字母即可得到不带属性值的CSS样式,像上面说到的margin. 1.而对于一些带有特定的属性值的CSS样式,只需输入CSS标签与属性值的首字母就可以,比如: ...