1:Mongod日誌有不少這樣的報錯:html
[initandlisten] connection refused because too many open connections: sql
2:查看系統的限制mongodb
core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 256072 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 65535 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 65535 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
結合Mongod.conf 的啓動參數確認不是系統的問題。日誌
3:添加numactl --interleave=all 參數後重啓Mongodhtm
#numactl --interleave=all mongod --config /mongodb/mongod.conf
4:也能夠添加以下參數臨時更改內存管理策略blog
#echo 0 > /proc/sys/vm/zone_reclaim_mode
#echo 2 > /proc/sys/vm/overcommit_memoryip
接下一篇博客:內存