redis错误vm.overcommit_memory&The TCP backlog setting of 511 cannot be enforced
原文:
http://skly-java.iteye.com/blog/2167400
错误
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.WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
解决方法
第一个警告两个方式解决(overcommit_memory)
1. echo "vm.overcommit_memory=1" > /etc/sysctl.conf 或 vi /etcsysctl.conf , 然后reboot重启机器
2. echo 1 > /proc/sys/vm/overcommit_memory 不需要启机器就生效
第二个警告解决
1. echo 511 > /proc/sys/net/core/somaxconn