MongoDB numa系列问题一:[initandlisten] connection refused because too many open connections:

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

MongoDB numa系列问题一:[initandlisten] connection refused because too many open connections:的相关文章

mongodb报错:connection refused because too many open connections: 819

问题: 发现mongodb无法连接,查看mongodb日志,出现大量的如下报错: [initandlisten] connection refused because too many open connections: 819 mongodb的连接数到达819后,就无法增加,所以无法连接上去. 分析解决: 1.maxConns 限制 默认情况下,在Linux系统中,mongodb的最大连接数为819. 可以修改mongodb的最大连接数,修改其配置文件mongod.conf: maxConns

mongodb connection refused because too many open connections: 819

Env Debian 9 # 使用通用二进制方式安装 # mongod --version db version v3.4.21-2.19 git version: 2e0631f5e0d868dd51b71e1e55eb8a57300d00df OpenSSL version: OpenSSL 1.0.2q 20 Nov 2018 allocator: tcmalloc modules: none build environment: distarch: x86_64 target_arch:

MongoDB numa系列问题二:WARNING: You are running on a NUMA machine.

1:Mongod日志warning: mongodb日志显示如下: WARNING: You are running on a NUMA machine. We suggest launching mongod like this to avoid performance problems: numactl –interleave=all mongod [other options] 2:解决方案: 在原启动命令前面加numactl –interleave=all #numactl --inte

MongoDB numa系列问题三:overcommit_memory和zone_reclaim_mode

内核参数overcommit_memory : 它是 内存分配策略 可选值:0.1.2.0:表示内核将检查是否有足够的可用内存供应用进程使用:如果有足够的可用内存,内存申请允许:否则,内存申请失败,并把错误返回给应用进程.1:表示内核允许分配所有的物理内存,而不管当前的内存状态如何.2:表示内核允许分配超过所有物理内存和交换空间总和的内存 内核参数zone_reclaim_mode: 可选值0.1a.当某个节点可用内存不足时:1.如果为0的话,那么系统会倾向于从其他节点分配内存2.如果为1的话,

pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

/home/mac126/.pyenv/versions/3.6.6/bin/python /home/mac126/Desktop/11/day1/mongo_cache.py Traceback (most recent call last): File "/home/mac126/Desktop/11/day1/mongo_cache.py", line 47, in <module> mongo_cache = MongoCache() File "/ho

android 127.0.0.1/localhost connection refused,在模拟器上应该用10.0.2.2访问你的电脑本机

调试中通过android simulator模拟器链接localhost或者127.0.0.1,因为我在电脑上面建立了apache,我的代码大概就是URL url = new URL(urlString);     URLConnection urlconn = url.openConnection(); 但是报错了!! Exception 1:java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused 问题是

com.microsoft.sqlserver.jdbc.SQLServerException: 到主机 的 TCP/IP 连接失败。 java.net.ConnectException: Connection refused: connect

问题描述:最简单的数据库连接报错,到主机  的 TCP/IP 连接失败.(win 7 操作系统) 错误信息: com.microsoft.sqlserver.jdbc.SQLServerException: 到主机  的 TCP/IP 连接失败. java.net.ConnectException: Connection refused: connect package sqlconnect; import java.sql.*; public class sqlconnect { public

[转]android访问网络:java.net.ConnectException: localhost/127.0.0.1:8888 - Connection refused

这对刚学会向tomcat模拟的本地服务器发送请求的同学非常重要! 转自:http://wing123.iteye.com/blog/1873763 描述:在做注册功能的时候,向本地服务器:127.0.0.1发送注册请求,logcat显示出错信息: java.net.ConnectException: localhost/127.0.0.1:8888 - Connection refused 解决办法:弃用127.0.0.1来访问服务器,改用本机的真实IP. 问题解释:摘自:http://80x8

linux下FTP拒绝(ftp: connect: Connection refused,500 OOPS: cannot read config file)

使用Ubunto15.0.4环境下,使用APT命令下载的vsftpd程序 在/etc/vsftpd.conf中开启匿名用户权限(anonymous_enable=YES),重新启动vsftpd后,在用ftp localhost,竟然会报ftp: connect: Connection refused的错误,使用sudo service vsftpd start,或sudo /etc/init.d/vsftpd start,竟然启动不起来.报500 OOPS: cannot read config