当前位置:首页 > 开发素材 > 正文内容

redis启动错误提示解决

admin9年前 (2017-09-07)开发素材1849

29581:M 07 Sep 11:01:20.505 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

29581:M 07 Sep 11:01:20.505 # Server started, Redis version 3.2.0

29581:M 07 Sep 11:01:20.505 # 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.

29581:M 07 Sep 11:01:20.505 # 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.


WARNING: The TCP backlog setting of 511.解决

原因就是因为128太小了。执行echo 511 > /proc/sys/net/core/somaxconn

命令就把这个问题解决了。但是这个只是暂时的。

如果想要永久解决,打开ietc/sysctl.conf,在这里面添net.core.somaxconn= 1024 然后执行sysctl -p 就可以永久消除这个warning


WARNING overcommit_memory is set to 0..解决

执行

echo 1 > /proc/sys/vm/overcommit_memory



WARNING you have Transparen Huge Pages..解决

执行

echo never > /sys/kernel/mm/transparent_hugepage/enabled

永久处理:

vi /etc/rc.local添加

if test -f /sys/kernel/mm/transparent_hugepage/enabled; then  
   echo never > /sys/kernel/mm/transparent_hugepage/enabled  
fi  
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then  
   echo never > /sys/kernel/mm/transparent_hugepage/defrag  
fi


分享到:

扫描二维码推送至手机访问。

版权声明:本文由云河空间发布,如需转载请注明出处。

本文链接:https://www.yuyunhe.cn/index.php/post/244.html

分享给朋友:

“redis启动错误提示解决” 的相关文章

php探针

php探针

 程序名称: ITlearner PHP探针 程序版本: v1.0下载地址:phpcheck-v1.0.zip 演示地址: http://www.9enjoy.com/phpcheck/phpcheck.php 功能描述: 服务器主要参数: &nbs...

H-ui 文件夹命名规范

admin     后台管理   app       应用   article   资讯  &...

ThinkPHP二级联动开发demo下载

ThinkPHP二级联动开发demo下载

ThinkPHP二级联动.zip...

iPhone/iPad/Android UI尺寸规范

iPhone/iPad/Android UI尺寸规范

iPhone界面尺寸设备分辨率PPI状态栏高度导航栏高度标签栏高度iPhone6 plus设计版1242×2208 px401PPI60px132px146pxiPhone6 plus放大版1125×2001 px401PPI54px132px146pxiPhone6 plus物理版1080×192...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。