redis启动报错(TCP backlog setting of 511/overcommit_memory is set to 0/THP)

  • WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

复制代码
1 vim /etc/sysctl.conf
2 
3 ```
4 # 添加内容
5 net.core.somaxconn = 1024
6 vm.overcommit_memory = 1
7 ```
8 
9 /sbin/sysctl -p
复制代码

 

  • 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.

 加入上一个问题的代码就可以解决

  • 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. 

追加代码到 /etc/rc.local 配置中

1 if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then
2    echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
3 fi

 

posted @   反转苹果派  阅读(238)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示