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?
如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。
如本文对您有用,捐赠和留言 将是对我最好的支持~(捐赠可转为站内积分)
如愿意,请向朋友推荐本站,谢谢。
尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。