Nginx File descriptor limit

假装没事ソ 提交于 2019-12-06 08:25:29

The correct way to increase the limit is by setting worker_rlimit_nofile.

Discussing each item:

1) /etc/security/limits.conf is only processed by pam_limits. Processes started from init.d generally do not utilize pam_limits. It's needed to set the ulimit at init level, in the service script, for example.

2) The default nginx init script doesn't have this setting (at least for Official Red Hat/CentOS packages). But changing this init script is a valid way, although it's not recommended.

3) worker_rlimit_nofile works only at process level, it's limited to the system's hard limit (ulimit -Hn). It serves to dynamically change the maximum file descriptors the nginx process can handle, which is typically defined with the system's soft limit.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!