zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

解决 redis Increased maximum number of open files to 10032 (it was originally set to 256).

RedisITset 解决 to of number open
2023-09-27 14:21:32 时间

Increased maximum number of open files to 10032 (it was originally set to 256).

open Redis 时会看到如下日志:

#You requested maxclients of 10000 requiring at least Redis can’t set maximum files to open Redis 建议把 files 至少设置成10032是如何来的呢?因为 maxclients 默认是10000,这些是用来处理客户端连接的,除此 之外,10032=10000+32。
第二行:open 10032,因为它没有权限设置。
第三行:当前系统的 files 是4096,所以将 maxclients 设置成4096-32=4064个,如果你想设置更高的 maxclients,请使用 ulimit-n 来设置。
从上面的三行日志分析可以看出 files 的限制优先级比 maxclients 大。 files 的设置方法如下:
ulimit –Sn {max-files}