Mongodb副本集--Out of memory: Kill process 37325 (mongod)

1.Mongodb副本集--Out of memory: Kill process 37325 (mongod)

场景描述:
恢复一个22TB数据的mongodb实例的时候.
将备用结点加入mongodb集群中,自动恢复数据实例的过程中。mongodb的系统日志报了如下错误:

Mongodb的日志

[rsSync]   Index Build: 252298635/292298635 88%

Linux的内核的日志:

Dec 28 13:09:30 localhost kernel: Out of memory: Kill process 37325 (mongod) score 632 or sacrifice child
Dec 28 13:09:30 localhost kernel: Killed process 37325, UID 0, (mongod) total-vm:35597613460kB, anon-rss:1752kB, file-rss:516kB

解决思路:

服务器为32GB内存,由于mongodb的重建索引的时候,吃掉所有内存,导致mongodb进程被杀掉。
增加服务器内存至64GB,正常恢复mongodb副本集。

猜你喜欢

转载自www.cnblogs.com/zhangshengdong/p/10113590.html