• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

[Plesk 11.0.9] Nginx Problem

vincenzo.t

Basic Pleskian
Hello,

from about 2 days I have problem with nginx, after httpdm reconfigure I receive this error:

nginx: [emerg] socket() 84.19.XXX.XXX:443 failed (24: Too many open files)
nginx: configuration file /etc/nginx/nginx.conf test failed

I have try to increase the openfile as this guide: http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/

But not works, at the moment on the server there is 415 2nd level domains, the problem happens after about 390 domains hosted.

Can help me to fix this issue please?

Thanks u.
 
The first change needs to be done in the startup script of Nginx (/etc/init.d/nginx for example). Add the following line at the top, exactly after the shell script interpreter location (shebang):

Code:
ulimit -n 65535

Then open the nginx configuration file (default: /etc/nginx/nginx.conf) and the following line right after the worker_processes entry line worker_rlimit_nofile 20480;

Once both changes are made, run the Nginx lint to make sure no errors have been introduced:

Code:
nginx -t

2010/11/01 17:07:46 [info] 9520#0: the configuration file /etc/nginx/nginx.conf syntax is ok
2010/11/01 17:07:46 [info] 9520#0: the configuration file /etc/nginx/nginx.conf was tested successfully

and then restart Nginx if above check is OK

Code:
/etc/init.d/nginx restart
 
Back
Top