mongodb在建立一个T级别的数据库时,进程挂掉的解决方法

所属分类: 数据库 / MongoDB 阅读数: 62
收藏 0 赞 0 分享

mongod进程退出, 退出时数据库中记录大概1.2亿,数据库小大600G

错误信息如下:

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

问题已经解决。有用机器是numa架构,因此在启动mongod进程的时候加上:numactl --interleave=all
mongodb官网上有如下说明,可供参考:
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.

更多精彩内容其他人还在看

MongoDB 3.4 安装以 Windows 服务方式运行的详细步骤

这篇文章主要介绍了MongoDB 3.4 安装以 Windows 服务方式运行的详细步骤,需要的朋友可以参考下
收藏 0 赞 0 分享

MongoDB如何查询耗时记录的方法详解

查询操作是我们日常操作数据库经常会遇到的一个功能,下面这篇文章主要给大家介绍了关于MongoDB如何查询耗时记录的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
收藏 0 赞 0 分享

MongoDB开源数据库开发工具dbKoda

这篇文章主要介绍了MongoDB开源数据库开发工具dbKoda的相关资料,需要的朋友可以参考下
收藏 0 赞 0 分享

MongoDB 查询操作的实例详解

这篇文章主要介绍了MongoDB 查询操作的实例的相关资料,希望通过本文能帮助到大家,需要的朋友可以参考下
收藏 0 赞 0 分享

java操作mongoDB查询的实例详解

这篇文章主要介绍了java操作mongo查询的实例详解的相关资料,希望通过本文能帮助到大家,需要的朋友可以参考下
收藏 0 赞 0 分享

windows7下使用MongoDB实现仓储设计

本文给大家介绍了本人在物联网环境下基于MongoDB实现的仓储的配置信息及具体的使用示例,非常的实用,有需要的小伙伴可以参考下
收藏 0 赞 0 分享

关于Mongodb 认证鉴权你需要知道的一些事

最近因为mongodb被黑了,早先我就疑惑过怎么这东西开启服务就能用了,后来找了各方资料,知道MongoDB默认是没有鉴权的,所以这篇文章主要给大家介绍了关于Mongodb认证鉴权你需要知道的一些事,需要的朋友可以参考下。
收藏 0 赞 0 分享

MongoDB TTL索引的实例详解

这篇文章主要介绍了 MongoDB TTL索引的实例详解的相关资料,希望通过本文能帮助到大家,让大家理解掌握这部分内容,需要的朋友可以参考下
收藏 0 赞 0 分享

MongoDB如何对数组中的元素进行查询详解

MongoDB在文档上支持数组,其次数组上可以实现嵌套,以及数组元素也可以文档。所以下面这篇文章主要给大家介绍了关于MongoDB如何对数组中元素进行查询的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
收藏 0 赞 0 分享

Mac中mongoDB的安装与卸载步骤详解

mongoDB是一个非常不错的数据库,最近也正在学习mongoDB,在使用一个数据库前必不可少的就是安装和卸载,所以下面这篇文章主要给大家介绍了关于Mac系统中mongoDB安装与卸载的相关资料,需要的朋友可以参考借鉴,下面来一起看看吧。
收藏 0 赞 0 分享
查看更多