Ubuntu系统设置了limits.conf,但Redis启动仍然报错:

# You requested maxclients of 10000 requiring at least 10032 max file descriptors.
# Redis can't set maximum open files to 10032 because of OS error: Operation not permitted
# Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.

新版Ubuntu要生效的话,需要确保PAM(Pluggable Authentication Module)已经启用。

在/etc/pam.d/common-session文件中添加“session required pam_limits.so”这一行即可启用。


参考资料

Why does redis report limit of 1024 files even after update to limits.conf?


如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《Ubuntu Redis在更新了limits.conf文件后仍然报告文件限制为1024 解决方案》相关的博文:


留言

avatar
😀
😀😁😂😅😭🤭😋😘🤔😰😱🤪💪👍👎🤝🌹👌