Redis 启动警告解决
Redis 启动警告解决【转】

[root@centos224]# service redisd start
21985:M 24 Nov 04:07:20.376 * Increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.2.1 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 21985
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' 21985:M 24 Nov 04:07:20.428 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
21985:M 24 Nov 04:07:20.428 # Server started, Redis version 3.2.1
21985:M 24 Nov 04:07:20.428 # 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.
21985:M 24 Nov 04:07:20.428 # 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.
21985:M 24 Nov 04:07:20.442 * DB loaded from disk: 0.014 seconds
21985:M 24 Nov 04:07:20.443 * The server is now ready to accept connections on port 6379

警告:
Increased maximum number of open files to 10032 (it was originally set to 1024).
解决办法:

#查看系统限制
[root@centos224]# ulimit -a #设置“open files”数量
[root@centos224]# ulimit -n 10032 #或者设置用户限制
[root@centos224]# vi /etc/security/limits.conf

警告:
WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
解决办法:
[root@centos224]# echo 511 >/proc/sys/net/core/somaxconn
[root@centos224]# echo "net.core.somaxconn = 551" > /etc/sysctl.conf
警告:
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.
解决办法:
[root@centos224]# echo 1 > /proc/sys/vm/overcommit_memory
[root@centos224]# echo "vm.overcommit_memory=1" >> /etc/sysctl.conf
警告:
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.
解决办法:

[root@centos224]# echo never > /sys/kernel/mm/transparent_hugepage/enabled
[root@centos224]# 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

个人公众号谢谢各位老铁支持

Redis 启动警告解决的更多相关文章
- Redis 启动警告解决【转】
[root@centos224]# service redisd start :M Nov :: (it was originally set to ). _._ _.-``__ ''-._ _.-` ...
- redis启动警告解决
vim /etc/rc.localecho never > /sys/kernel/mm/transparent_hugepage/enabled加入上面那句到/etc/rc.local,开机启 ...
- Redis 启动警告错误解决[转]
Redis 启动警告错误解决 启动错误 1.WARNING overcommit_memory is set to 0! Background save may fail under low memo ...
- Redis启动警告错误解决
启动错误 (1)WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxc ...
- Redis 启动警告错误解决
启动错误 1.WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. T ...
- 【docker】【redis】2.docker上设置redis集群---Redis Cluster部署【集群服务】【解决在docker中redis启动后,状态为Restarting,日志报错:Configured to not listen anywhere, exiting.问题】【Waiting for the cluster to join...问题】
参考地址:https://www.cnblogs.com/zhoujinyi/p/6477133.html https://www.cnblogs.com/cxbhakim/p/9151720.htm ...
- Docker安装Redis及Warning解决方法
虚拟机环境:VirtualBox 操作系统:CentOS 7 宿主机: Microsoft Windows 10 家庭中文版 Docker简介 Docker是一个轻量级容器技术.Docker直接运行在 ...
- Redis 错误1067:进程意外终止,Redis不能启动,Redis启动不了
Redis 错误1067:进程意外终止,Redis不能启动,Redis启动不了 >>>>>>>>>>>>>>> ...
- redis启动出错Creating Server TCP listening socket 127.0.0.1:6379: bind: No error(转)
redis启动出错Creating Server TCP listening socket 127.0.0.1:6379: bind: No error windows下安装Redis第一次启动报 ...
随机推荐
- 如何在maven项目中引用领一个项目
1 有两个项目 maven01 和maven 02,想在maven 02中引用maven01的方法,该如何操作呢 maven01中Factory类中的方法 public class Factory ...
- python读取文件乱码
方法一:使用codecs import codecs f = codecs.open('nlpir/Readme.txt','r','GBK') line = f.readline() while l ...
- 软件-客户端管理工具-SourceTree:百科
ylbtech-软件-客户端管理工具-SourceTree:百科 SourceTree 是 Windows 和Mac OS X 下免费的 Git 和 Hg 客户端管理工具,同时也是Mn版本控制系统工具 ...
- 阶段3 1.Mybatis_03.自定义Mybatis框架_1.自定义Mybatis的分析-执行查询所有分析
- ArchLinux下XFCE的一个问题修复:thunar加载的环境变量不正确
家里的电脑上,安装了Arch32与Arch64.不记得以前做过什么操作, 导致在Arch32下,Thunar启动后,其环境变量缺失很多内容. 主要在PATH及LD_LIBRARY_PATH几个关键变量 ...
- 编写shell脚本一键启动 重启 停止springboot项目
#!/bin/bash #设置环境变量 export JAVA_HOME=/usr/local/jdk1.8.0_181 export JRE_HOME=/$JAVA_HOME/jre export ...
- C++——堆、栈与内存管理
简介 Stack,是存在于某作用域(scope) 的一块内存空间(memory space).例如当你调用函数,函数本身即会形成一个stack 用來放置它所接收的参数,以及返回地址.在函数本体(fun ...
- Django REST framework JWT学习
1.JWT学习 在用户注册或登录后,我们想记录用户的登录状态,或者为用户创建身份认证的凭证.我们不再使用Session认证机制,而使用Json Web Token认证机制. Json web toke ...
- [Mac Terminal] ___切换到其他路径和目录
如果你想将当前 command line 会话切换到其他目录,需要用到三个命令:pwd,ls和cd. pwd的含义是“print working directory”,会显示当前目录的绝对路径.ls的 ...
- HTML5实现绘制几何图形
HTML5新增了一个<canvas.../>属性.该元素自身并不绘制图形,只是相当于一张空画布.如果开发者需要向<canvas.../>上绘制图形则必须使用JavaScript ...