Linux 启动redis 报错:WARNING: The TCP backlog setting of 511 cannot be enforced

今天启动redis报错,看了下报错的信息:

WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sys

WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this i

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.如图:

Linux 启动redis 报错:WARNING: The TCP backlog setting of 511 cannot be enforced_第1张图片

错误原因:由于我是安装的redis3.0,可能是版本比较旧,这句话的翻译大概就是:对一个高负载的环境来说tcp设置128这个值,太小了。 这是我的理解,具体的还需到官网理解 手动设置,或者设置永久值.所以执行:

2.执行命令: vi etc/sysctl.conf

Linux 启动redis 报错:WARNING: The TCP backlog setting of 511 cannot be enforced_第2张图片

3.在文件里面添加 net.core.somaxconn= 1024

Linux 启动redis 报错:WARNING: The TCP backlog setting of 511 cannot be enforced_第3张图片

4.保存退出 然后执行sysctl -p  然后可以正常启动

Linux 启动redis 报错:WARNING: The TCP backlog setting of 511 cannot be enforced_第4张图片

 

 

你可能感兴趣的:(Exception)