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、报错内容

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/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

2、解决

sudo vim /etc/sysctl.conf

net.ipv4.conf.default.accept_source_route = 1
vm.overcommit_memory = 1
net.core.somaxconn = 1024

sudo sysctl -p
原文地址:https://www.cnblogs.com/kikyoqiang/p/14615296.html