我想说我是 mongodb 的新手,今天我试图恢复转储文件。我在我的 mongod 中得到Assertion failure _state.get()
during mongorestore
dump,当时进程卡住了。mongodb环境如下:
Mongodb version is - 3.2.16-11-g1abb660
O.S - Windows 7 Enterprise 32-bit
mongodb is running in Domain account.
当我从我的网站发送以下restore
转储日志时mongod
2017-10-11T12:40:22.994+0300 I - [conn11] Assertion failure _state.get() < 0 C:\data\mci\89fbcdee7b6a486969190f06feaabe28\src\src\mongo/util/concurrency/rwlock.h 204
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\util\log.cpp(136) mongo::logContext+0xba
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\util\assert_util.cpp(137) mongo::verifyFailed+0x17e
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\mmap_windows.cpp(164) mongo::MemoryMappedFile::close+0x5a
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\mmap_windows.cpp(340) mongo::MemoryMappedFile::map+0x800
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\durable_mapped_file.cpp(261) mongo::DurableMappedFile::create+0x137
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\data_file.cpp(175) mongo::DataFile::open+0x167
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\mmap_v1_extent_manager.cpp(241) mongo::MmapV1ExtentManager::_addAFile+0x175
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\mmap_v1_extent_manager.cpp(393) mongo::MmapV1ExtentManager::_createExtent+0x8d
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\mmap_v1_extent_manager.cpp(497) mongo::MmapV1ExtentManager::allocateExtent+0x93
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\record_store_v1_base.cpp(528) mongo::RecordStoreV1Base::increaseStorageSize+0x2f
2017-10-11T12:40:23.693+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\record_store_v1_simple.cpp(169) mongo::SimpleRecordStoreV1::allocRecord+0x28a
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\record_store_v1_base.cpp(353) mongo::RecordStoreV1Base::_insertRecord+0x8d
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\mmap_v1\record_store_v1_base.cpp(342) mongo::RecordStoreV1Base::insertRecord+0x145
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\storage\record_store.h(379) mongo::RecordStore::insertRecords+0x6a
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\catalog\collection.cpp(443) mongo::Collection::_insertDocuments+0x20b
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\catalog\collection.cpp(361) mongo::Collection::insertDocuments+0x248
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\catalog\collection.cpp(378) mongo::Collection::insertDocument+0x73
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands\write_commands\batch_executor.cpp(1048) mongo::insertOne+0x155
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands\write_commands\batch_executor.cpp(784) mongo::WriteBatchExecutor::insertMany+0x15b
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands\write_commands\batch_executor.cpp(846) mongo::WriteBatchExecutor::execInserts+0x247
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands\write_commands\batch_executor.cpp(686) mongo::WriteBatchExecutor::bulkExecute+0x6f
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands\write_commands\batch_executor.cpp(332) mongo::WriteBatchExecutor::executeBatch+0x2d4
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands\write_commands\write_commands.cpp(146) mongo::WriteCmd::run+0x157
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\dbcommands.cpp(1468) mongo::Command::run+0x791
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\dbcommands.cpp(1340) mongo::Command::execCommand+0x75f
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\commands.cpp(505) mongo::runCommands+0x282
2017-10-11T12:40:23.694+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\instance.cpp(263) mongo::receivedCommand+0x287
2017-10-11T12:40:23.695+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\instance.cpp(520) mongo::assembleResponse+0x51d
2017-10-11T12:40:23.695+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\db\db.cpp(180) mongo::`anonymous namespace'::MyMessageHandler::process+0x93
2017-10-11T12:40:23.695+0300 I CONTROL [conn11] mongod.exe ...\src\mongo\util\net\message_server_port.cpp(229) mongo::PortMessageServer::handleIncomingMsg+0x3f8
2017-10-11T12:40:23.698+0300 I CONTROL [conn11] mongod.exe c:\program files (x86)\microsoft visual studio 12.0\vc\include\thr\xthread(187) std::_LaunchPad<std::_Bind<1,void *,void * (__cdecl*const)(void *),nspr::Thr
ead *> >::_Go+0x10
2017-10-11T12:40:23.699+0300 I CONTROL [conn11] mongod.exe f:\dd\vctools\crt\crtw32\stdcpp\thr\threadcall.cpp(28) _Call_func+0x17
2017-10-11T12:40:23.699+0300 I CONTROL [conn11] mongod.exe f:\dd\vctools\crt\crtw32\startup\threadex.c(376) _callthreadstartex+0x1b
2017-10-11T12:40:23.699+0300 I CONTROL [conn11] mongod.exe f:\dd\vctools\crt\crtw32\startup\threadex.c(354) _threadstartex+0x7c
2017-10-11T12:40:23.703+0300 I CONTROL [conn11] kernel32.dll BaseThreadInitThunk+0x12
2017-10-11T12:40:23.703+0300 I CONTROL [conn11] ntdll.dll RtlInitializeExceptionChain+0xef
2017-10-11T12:40:23.704+0300 I CONTROL [conn11]
2017-10-11T12:40:23.705+0300 I CONTROL [conn13] MapViewOfFileEx for C:\data\db\citibike.2 at address 00000000 failed with errno:8 Not enough storage is available to process this command. (file size is 268435456) in Memo
ryMappedFile::map
2017-10-11T12:40:23.708+0300 I - [conn13] Assertion failure _state.get() < 0 C:\data\mci\89fbcdee7b6a486969190f06feaabe28\src\src\mongo/util/concurrency/rwlock.h 204
我还附上了mongorestore
转储错误和mongod
屏幕截图
任何帮助或建议将不胜感激。
使用 32 位操作系统,MongoDB 的 MMAP 存储引擎的总可寻址文件大小限制为 ~2GB 数据,包括索引(和日志,如果启用)。鉴于内存映射文件的 32 位限制,在 32 位 MongoDB 构建中默认关闭日志记录,否则数据限制将减半。这不是任何重要数据的推荐配置:不干净的关闭很可能导致数据完整性问题。
WiredTiger 存储引擎是 MongoDB 3.2 及更新版本中的默认存储引擎,仅支持 64 位操作系统。
从提供的日志看来,您已经超出了 32 位服务器可以进行内存映射的最大存储大小:
如果您的数据库对于 32 位 O/S 上的 MMAP 限制来说太大,您将不得不进行部分还原或升级到 64 位环境。
注意:从 MongoDB 3.2 开始,32 位服务器版本已正式弃用,并且不再适用于 MongoDB 3.4+。