1:Mongod日志有很多这样的报错:
[initandlisten] connection refused because too many open connections:
2:查看系统的限制
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 参数后重启Mongod
#numactl --interleave=all mongod --config /mongodb/mongod.conf
4:也可以添加如下参数临时更改内存管理策略
#echo 0 > /proc/sys/vm/zone_reclaim_mode
#echo 2 > /proc/sys/vm/overcommit_memory
接下一篇博客:
http://www.cnblogs.com/xiaoit/p/4484343.html
时间: 2024-10-04 21:27:18