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在Windows平臺(tái)的安裝及配置方法
這篇文章主要介紹了MongoDB在Windows平臺(tái)的安裝及配置方法,簡(jiǎn)單分析了MongoDB的下載、設(shè)置方法、操作命令等具體步驟與相關(guān)注意事項(xiàng),需要的朋友可以參考下2017-04-04
Mongodb基本操作與Python連接mongodb并進(jìn)行基礎(chǔ)操作的方法
mongodb是基于分布式文件存儲(chǔ)的nosql(非關(guān)系型)數(shù)據(jù)庫(kù),本文分享了mongodb的基礎(chǔ)操作和Python連接并操作mongodb的基礎(chǔ)方法,基礎(chǔ)的不能再基礎(chǔ)了2018-09-09
MongoDB學(xué)習(xí)之Text Search文本搜索功能
這篇文章主要給大家介紹了MongoDB之Text Search文本搜索功能的相關(guān)資料,文中給出了詳細(xì)的示例代碼供大家參考學(xué)習(xí),對(duì)大家具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起看看吧。2017-05-05
express+mongoose實(shí)現(xiàn)對(duì)mongodb增刪改查操作詳解
這篇文章主要介紹了express+mongoose實(shí)現(xiàn)對(duì)mongodb增刪改查操作,結(jié)合實(shí)例形式分析了express+mongoose對(duì)mongodb增刪改查操作基本實(shí)現(xiàn)方法與操作注意事項(xiàng),需要的朋友可以參考下2020-05-05
為MongoDB數(shù)據(jù)庫(kù)注冊(cè)windows服務(wù)
這篇文章介紹了為MongoDB數(shù)據(jù)庫(kù)注冊(cè)windows服務(wù)的方法,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2022-06-06

