Redis报错解决The TCP backlog setting of 511 cannot be enforced和This will create latency and memory usage

在尝试启动Redis时遇到错误提示'The TCP backlog setting of 511 cannot be enforced'和'This will create latency and memory usage'。为解决问题,需遵循推荐的配置调整。

在启动Redis的时候报错如下:

16426:M 04 May 10:30:43.721 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128
3:M 14 Oct 15:19:54.878 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 3453:M 14 Oct 15:19:54.878 # Server started, Redis version 3.2.12 3453:M 14 Oct 15:19:54.878 # 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. 3453:M 14 Oct 15:19:54.879 # 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. 3453:M 14 Oct 15:19:54.879 * DB loaded from disk: 0.000 seconds 3453:M 14 Oct 15:19:54.879 * The server is now ready to accept connections on port 6379 3453:signal-handler (1760426425) Received SIGINT scheduling shutdown... 3453:M 14 Oct 15:20:25.662 # User requested shutdown... 3453:M 14 Oct 15:20:25.663 * Saving the final RDB snapshot before exiting. 3453:M 14 Oct 15:20:25.670 * DB saved on disk 3453:M 14 Oct 15:20:25.670 * Removing the pid file. 3453:M 14 Oct 15:20:25.671 # Redis is now ready to exit, bye bye... 4067:M 14 Oct 15:22:38.599 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.2.12 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 4067 `-._ `-._ `
最新发布
10-15
这个告警信息是指TCP backlog设置为511,但无法被强制执行,因为/proc/sys/net/core/somaxconn的值被设定为较低的128。这个告警信息说明了系统中的一个配置问题,导致TCP backlog的设置无法生效。TCP backlog是指内核在处理传入连接请求时所能够排队等待的最大连接数。在这个情况下,由于/proc/sys/net/core/somaxconn的值被设定为128,低于511,所以无法实现期望的设置。要解决这个问题,需要修改/proc/sys/net/core/somaxconn的值为大于等于511的数值,以使TCP backlog的设置生效。之后,系统将能够处理更多的传入连接请求。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is s](https://blog.csdn.net/ppwwp/article/details/102499887)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [redis启动后的警告问题](https://blog.csdn.net/weixin_40482816/article/details/120071310)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Redis 中如何解决 The TCP backlog setting of 511 cannot be enforced 告警问题?](https://blog.csdn.net/afreon/article/details/118727725)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值