当我执行mongo导入200,000条记录时,我的一半记录只会被插入而其余的记录只会被遗留,但如果我导入10,000条记录,则会成功导入。我的日志的一小部分如下所示。我用1gb ram运行ubuntu linux 11.04。
Fri Jun 29 23:10:38 [conn7] insert doctor_development.alabama_nps exception: file /home/abhay/data/db/doctor_development.1 open/create failed in createPrivateMap (look in log for more information) code:13636 3ms
Fri Jun 29 23:10:38 [conn7] ERROR: mmap private failed with out of memory. (64 bit build)
Fri Jun 29 23:10:38 [conn7] Assertion: 13636:file /home/abhay/data/db/doctor_development.1 open/create failed in createPrivateMap (look in log for more information)
0x588cb2 0x75b95e 0x75c853 0x8a07cb 0x89c0e2 0x89c7c5 0x89ca3f 0x8a1b52 0x8a1d57 0x8aede9 0x8b04bb 0x8817f8 0x887371 0x889825 0xa9c576 0x638937 0x2b8a68736d8c 0x2b8a691d604d
./mongod(_ZN5mongo11msgassertedEiPKc+0x112) [0x588cb2]
./mongod(_ZN5mongo8MongoMMF13finishOpeningEv+0x1be) [0x75b95e]
./mongod(_ZN5mongo8MongoMMF6createESsRyb+0x63) [0x75c853]
./mongod(_ZN5mongo13MongoDataFile4openEPKcib+0x14b) [0x8a07cb]
./mongod(_ZN5mongo8Database7getFileEiib+0x102) [0x89c0e2]
./mongod(_ZN5mongo8Database12suitableFileEPKcibb+0x55) [0x89c7c5]
./mongod(_ZN5mongo8Database11allocExtentEPKcibb+0x7f) [0x89ca3f]
./mongod(_ZN5mongo10outOfSpaceEPKcPNS_16NamespaceDetailsEibNS_7DiskLocE+0x112) [0x8a1b52]
./mongod(_ZN5mongo26allocateSpaceForANewRecordEPKcPNS_16NamespaceDetailsEib+0x77) [0x8a1d57]
./mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibbPb+0x4a9) [0x8aede9]
./mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb+0x4b) [0x8b04bb]
./mongod(_ZN5mongo14checkAndInsertEPKcRNS_7BSONObjE+0xa8) [0x8817f8]
./mongod(_ZN5mongo14receivedInsertERNS_7MessageERNS_5CurOpE+0x441) [0x887371]
./mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x1155) [0x889825]
./mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x76) [0xa9c576]
./mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x287) [0x638937]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x6d8c) [0x2b8a68736d8c]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x2b8a691d604d]
Fri Jun 29 23:10:38 [conn7] insert doctor_development.alabama_nps exception: file /home/abhay/data/db/doctor_development.1 open/create failed in createPrivateMap (look in log for more information) code:13636 3ms
Fri Jun 29 23:10:38 [conn7] ERROR: mmap private failed with out of memory. (64 bit build)
Fri Jun 29 23:10:38 [conn7] Assertion: 13636:file /home/abhay/data/db/doctor_development.1 open/create failed in createPrivateMap (look in log for more information)
0x588cb2 0x75b95e 0x75c853 0x8a07cb 0x89c0e2 0x89c7c5 0x89ca3f 0x8a1b52 0x8a1d57 0x8aede9 0x8b04bb 0x8817f8 0x887371 0x889825 0xa9c576 0x638937 0x2b8a68736d8c 0x2b8a691d604d
./mongod(_ZN5mongo11msgassertedEiPKc+0x112) [0x588cb2]
./mongod(_ZN5mongo8MongoMMF13finishOpeningEv+0x1be) [0x75b95e]
./mongod(_ZN5mongo8MongoMMF6createESsRyb+0x63) [0x75c853]
./mongod(_ZN5mongo13MongoDataFile4openEPKcib+0x14b) [0x8a07cb]
./mongod(_ZN5mongo8Database7getFileEiib+0x102) [0x89c0e2]
./mongod(_ZN5mongo8Database12suitableFileEPKcibb+0x55) [0x89c7c5]
./mongod(_ZN5mongo8Database11allocExtentEPKcibb+0x7f) [0x89ca3f]
./mongod(_ZN5mongo10outOfSpaceEPKcPNS_16NamespaceDetailsEibNS_7DiskLocE+0x112) [0x8a1b52]
./mongod(_ZN5mongo26allocateSpaceForANewRecordEPKcPNS_16NamespaceDetailsEib+0x77) [0x8a1d57]
./mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibbPb+0x4a9) [0x8aede9]
./mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb+0x4b) [0x8b04bb]
./mongod(_ZN5mongo14checkAndInsertEPKcRNS_7BSONObjE+0xa8) [0x8817f8]
./mongod(_ZN5mongo14receivedInsertERNS_7MessageERNS_5CurOpE+0x441) [0x887371]
./mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x1155) [0x889825]
./mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x76) [0xa9c576]
./mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x287) [0x638937]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x6d8c) [0x2b8a68736d8c]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x2b8a691d604d]
答案 0 :(得分:0)
这不是最好的答案,但它确定了。我使用了mongodb 2.0.6,如上所述,它给出了各种各样的错误,但是当我把它降级到1.8.5时,它就像魅力一样。
答案 1 :(得分:0)
对我来说,问题是32位系统中的2gb限制: http://blog.mongodb.org/post/137788967/32-bit-limitations