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第一次启动报 ...
随机推荐
- html上传文件
不太懂Html 做备用 html的文件上传分两个 第一个是Html文件 浏览器加载用的 另一个是PHP文件 处理上传文件的 下面是Html文件 叫index.html <html> < ...
- Sensor在内核中的驱动框架【转】
本文转载自:http://blog.csdn.net/armfpga123/article/details/52840370 内核中对sensor的抽象:drivers/sensors/sensors ...
- 【漏洞复现】永恒之蓝 ms17-010 漏洞利用 攻击手法
日期:2018-07-21 21:09:16 介绍:永恒之蓝利用的 ms17-010 漏洞,拿 Shell.查看文件.获取密码. 0x01.实验环境 攻击机 系统:macOS Sierra 10.12 ...
- 前端使用Git 切换分支 查看线上远程,本地切换
想要使用Git切换线上分支时先 得先查看线上分支 git branch -a //查看线上分支 git branch //查看本地分支 这是线上的分支图(当前是master) 知道有那些分支就可以进行 ...
- Python3 多线程编程 threading模块
性能自动化测试除了用jmeter还可以用python threading模块做 一.threading模块定义 Python 2.4中包含的较新的线程模块为线程提供了更强大的高级支持. 线程模块公开线 ...
- Java课堂疑问解答与思考4
一. 请运行以下示例代码StringPool.java,查看其输出结果.如何解释这样的输出结果?从中你能总结出什么? 答:定义的三个字符串如果相等,系统自动创建一个,并调用这个,对于由new创建的字符 ...
- Java多线程学习——join方法的使用
join在线程里面意味着“插队”,哪个线程调用join代表哪个线程插队先执行——但是插谁的队是有讲究了,不是说你可以插到队头去做第一个吃螃蟹的人,而是插到在当前运行线程的前面,比如系统目前运行线程A, ...
- 函数参数中经常见到的*args和**kwargs
在python中,这两个是python中的可变参数,*arg表示任意多个无名参数,类型为tuple;**kwargs表示关键字参数,为dict. 例如下面这个代码可以利用*args计算传入的n个数的平 ...
- Web安全测试中常见逻辑漏洞解析(实战篇)
Web安全测试中常见逻辑漏洞解析(实战篇) 简要: 越权漏洞是比较常见的漏洞类型,越权漏洞可以理解为,一个正常的用户A通常只能够对自己的一些信息进行增删改查,但是由于程序员的一时疏忽,对信息进行增删改 ...
- 扫描 + 注解完成bean的自动配置
链接:https://pan.baidu.com/s/1W3TINXNnqpxmkIADOcJZCQ 提取码:fmt5 我们知道,我们一般是通过id或name调用getBean方法来从IOC容器中获取 ...