nginx fails to start/reload on a Plesk server: Too many open files

Follow

Comments

4 comments

  • Avatar
    Dario D'Orazi

    to reduce the limit? If I try to increase it works if instead I want to reduce it it doesn't work.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Dario D'Orazi

    The idea of the resolution is to increase the limit. 

    4096 is more when the default value.

    The value is to be set more than number of domains in Plesk * 16 at least.

    So, you did everything correctly when increasing the value.

    0
    Comment actions Permalink
  • Avatar
    Dario D'Orazi

    Hello Ivan,

    by typing mistake I increased the value to 40960 and I would like to lower it but I can't

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov

    Hi @Dario D'Orazi,

    In order to decrease the value, please adjust it manually:
    1. Update value LimitNOFILE in files /usr/lib/systemd/system/httpd.service.d/limit_nofile.conf and /usr/lib/systemd/system/nginx.service.d/limit_nofile.conf

    2. Update value worker_rlimit_nofile in /etc/nginx/ulimit.global_params

    3. Restart Nginx and Apache services:
    # systemctl daemon-reload
    # systemctl restart nginx
    # systemctl restart httpd

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request