mongodb在建立一個(gè)T級(jí)別的數(shù)據(jù)庫(kù)時(shí),進(jìn)程掛掉的解決方法
mongod進(jìn)程退出, 退出時(shí)數(shù)據(jù)庫(kù)中記錄大概1.2億,數(shù)據(jù)庫(kù)小大600G
錯(cuò)誤信息如下:
Sat May 12 08:37:18 Invalid access at address: 0x7ef6036a9000 Sat May 12 08:37:19 Got signal: 7 (Bus error). Sat May 12 08:37:19 [conn4878] moveChunk data transfer progress: { active: true, ns: "genbank.main", from: "shard1/192.168.136.72:29022,192.168.136.73:29023,192.168.136.79:29021", min: { _id: ObjectId('4fabda86be960438ed0099d2') }, max: { _id: ObjectId('4fabdaa1be960439500040b1') }, state: "clone", counts: { cloned: 8138, clonedBytes: 50270960, catchup: 0, steady: 0 }, ok: 1.0 } my mem used: 0 Sat May 12 08:37:19 Backtrace: 0xa90999 0xa90f70 0x7f3c7ffcc060 0x7f3c7f5b3873 0xa48342 0xa48c76 0x97cd04 0x97e2ff 0x940ca5 0x944574 0x8866b7 0x88dc29 0xaa33f6 0x637407 0x7f3c7ffc3efc 0x7f3c7f55d89d /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0xa90999] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x220) [0xa90f70] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10060) [0x7f3c7ffcc060] /lib/x86_64-linux-gnu/libc.so.6(+0x137873) [0x7f3c7f5b3873] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo17MigrateFromStatus5cloneERSsRNS_14BSONObjBuilderE+0x3d2) [0xa48342] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo19InitialCloneCommand3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x16) [0xa48c76] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x6a4) [0x97cd04] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x6ff) [0x97e2ff] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x35) [0x940ca5] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x1724) [0x944574] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod() [0x8866b7] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x559) [0x88dc29] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x76) [0xaa33f6] /usr/local/mongodb-linux-x86_64-2.0.4/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x287) [0x637407] /lib/x86_64-linux-gnu/libpthread.so.0(+0x7efc) [0x7f3c7ffc3efc] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f3c7f55d89d] Logstream::get called in uninitialized state Sat May 12 08:37:19 ERROR: Client::~Client _context should be null but is not; client:conn Logstream::get called in uninitialized state Sat May 12 08:37:19 ERROR: Client::shutdown not called: conn
問(wèn)題已經(jīng)解決。有用機(jī)器是numa架構(gòu),因此在啟動(dòng)mongod進(jìn)程的時(shí)候加上:numactl --interleave=all
mongodb官網(wǎng)上有如下說(shuō)明,可供參考:
Linux, NUMA and MongoDB tend not to work well together. If you are running MongoDB on numa hardware, we recommend turning it off (running with an interleave memory policy). Problems will manifest in strange ways, such as massive slow downs for periods of time or high system cpu time.
numactl
To turn off NUMA, start mongod with
numactl --interleave=all ${MONGODB_HOME}/bin/mongod --config conf/mongodb.conf
proc settings
echo 0 > /proc/sys/vm/zone_reclaim_mode
You can change zone_reclaim_mode without restarting mongod. For more information on this setting seehttp://www.kernel.org/doc/Documentation/sysctl/vm.txt.
相關(guān)文章
Mongodb使用索引進(jìn)行查詢優(yōu)化的操作方法
為集合建立合適的索引,能夠有效的減少查詢操作時(shí)掃描數(shù)據(jù)的數(shù)量 ,從而提高查詢效率,簡(jiǎn)化了mongodb內(nèi)部查詢工作,這篇文章主要介紹了Mongodb使用索引進(jìn)行查詢優(yōu)化的操作方法,需要的朋友可以參考下2024-06-06深入了解MongoDB是如何存儲(chǔ)數(shù)據(jù)的
MongoDB是一個(gè)可擴(kuò)展、高性能的分布式文檔存儲(chǔ)數(shù)據(jù)庫(kù),由C 語(yǔ)言編寫(xiě),下面這篇文章主要給大家介紹了關(guān)于MongoDB是如何存儲(chǔ)數(shù)據(jù)的相關(guān)資料,文中介紹的非常詳細(xì),對(duì)大家具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起看看吧。2017-07-07MongoDB對(duì)數(shù)組進(jìn)行增刪改查操作
與關(guān)系型數(shù)據(jù)庫(kù)相比,MongoDB支持?jǐn)?shù)組,將數(shù)組存儲(chǔ)到文檔之中,下面這篇文章主要給大家介紹了關(guān)于MongoDB對(duì)數(shù)組進(jìn)行增刪改查操作的相關(guān)資料,文中通過(guò)實(shí)例代碼介紹的非常詳細(xì),需要的朋友可以參考下2023-05-05Mongodb億級(jí)數(shù)據(jù)性能測(cè)試和壓測(cè)
MongoDB是一個(gè)開(kāi)源的、基于分布式文件存儲(chǔ)的NoSQL數(shù)據(jù)庫(kù)系統(tǒng),它使用文檔存儲(chǔ)方式,數(shù)據(jù)結(jié)構(gòu)由鍵值(key-value)對(duì)組成,本文給大家介紹了Mongodb億級(jí)數(shù)據(jù)性能測(cè)試和壓測(cè),需要的朋友可以參考下2024-06-06mongodb索引知識(shí)_動(dòng)力節(jié)點(diǎn)Java學(xué)院整理
這篇文章給大家介紹了mongodb索引的建立,刪除索引的方法以及唯一索引和組合索引的知識(shí),感興趣的朋友一起看看吧2017-08-08使用命令方式安裝MongoDB指南(Windows、Linux)
這篇文章主要介紹了使用命令方式安裝MongoDB指南,本文分別介紹Windows、Linux下使用命令的方式安裝mongodb,需要的朋友可以參考下2015-04-04MongoDB備份、還原、導(dǎo)出、導(dǎo)入、克隆操作示例
這篇文章主要介紹了MongoDB備份、還原、導(dǎo)出、導(dǎo)入、克隆操作示例,本文分別給操作代碼、命令實(shí)例,需要的朋友可以參考下2015-07-07