CentOS 7.2 redis-3.0.5 WARNING solved


8589:M 05 Dec 14:28:58.509 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
8589:M 05 Dec 14:28:58.509 # Server started, Redis version 3.0.5
8589:M 05 Dec 14:28:58.509 # 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.
8589:M 05 Dec 14:28:58.523 # 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 issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.


# vi /etc/sysctl.conf
vm.overcommit_memory = 1
net.core.somaxconn = 4096
# /sbin/sysctl -p

# echo never > /sys/kernel/mm/transparent_hugepage/enabled
# vi /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/enabled

# vi /etc/security/limits.conf
redis hard nofile 64000
redis soft nofile 64000


Last update: 2021-12-02
Back to top