Redis starts with warning WARNING: The TCP backlog setting of 511. Solved

Turn  

WARNING: The TCP backlog setting of 511.解决

2017-07-13 02:18 by faunjoe88, 4564  reads, 0  comments, favorites , editors    

redis启动警告问题:WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

1. Start redis, command: redis-server redis.conf path file

2.会发现warning警告,WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 如下图

3. The translation of this sentence is probably: For a high-load environment, the value of tcp setting 128 is too small. This is my understanding, and those who are absolutely dead still need to go to the official website to understand. Then we can set it manually, or set a permanent value. So execute:

 

4. After the execution is as follows, the problem is solved.

5.

The reason is because 128 is too small. Execute echo 511 > /proc/sys/net/core/somaxconn

The command solved the problem. But this is only temporary. If you want a permanent solution, open ietc/sysctl.conf

Add net.core.somaxconn= 1024 to it and then execute sysctl -p to permanently eliminate this warning

Since the problem was solved by referring to this blog, I brought up the content of /etc/sysctl.conf, and I won’t hit it by hand when I encounter it.

vim /etc/sysctl.conf paste it whenever centos6/7 encounters this problem

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 687194767336
kernel.shmall = 4294967296
net.core.somaxconn = 1024

 

 

I can't see this 128 warning when I start redis here.

 

redis启动警告问题:WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

1. Start redis, command: redis-server redis.conf path file

2.会发现warning警告,WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 如下图

3. The translation of this sentence is probably: For a high-load environment, the value of tcp setting 128 is too small. This is my understanding, and those who are absolutely dead still need to go to the official website to understand. Then we can set it manually, or set a permanent value. So execute:

 

4. After the execution is as follows, the problem is solved.

5.

The reason is because 128 is too small. Execute echo 511 > /proc/sys/net/core/somaxconn

The command solved the problem. But this is only temporary. If you want a permanent solution, open ietc/sysctl.conf

Add net.core.somaxconn= 1024 to it and then execute sysctl -p to permanently eliminate this warning

Since the problem was solved by referring to this blog, I brought up the content of /etc/sysctl.conf, and I won’t hit it by hand when I encounter it.

vim /etc/sysctl.conf paste it whenever centos6/7 encounters this problem

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 687194767336
kernel.shmall = 4294967296
net.core.somaxconn = 1024

 

 

I can't see this 128 warning when I start redis here.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325290289&siteId=291194637