• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue nginx: [emerg] "worker_rlimit_nofile" directive is duplicate

Xela

New Pleskian
Hi there
Plesk Panel (12.5.30 Update #67) shows:
New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] "worker_rlimit_nofile" directive is duplicate in /etc/nginx/ulimit.global_params:1 nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter

I commented out
#worker_rlimit_nofile 2048;
in /etc/nginx/ulimit.global_params and did
plesk repair web
without success.
Any recommendations?
 
Hi Xela,

what it is output of the command:

Code:
find /etc/nginx -type f -exec grep --color -Hni "worker_rlimit_nofile" {} \;

If you have receive more than ONE lines for your find - command, pls. make sure, than only one of them is not commented out. ;)
After your possible changes, pls. post the output of the command:
Code:
nginx -t
... to verify that your configuration files don't contain further misconfigurations and pls. repeat the command, IF you get the previous output:
Code:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Code:
plesk repair web -y -v
 
The problem is that with an increasing number of domains, the Nginx configuration is auto-updated and an additional file /etc/nginx/ulimit.global_params is created with the worker_rlimit entry while that entry still exists in /etc/nginx/nginx.conf, too. The entry in /etc/nginx/nginx.conf must be commented out, Nginx can be restarted afterwards.

I have never identified the root cause, e.g. whether Nginx is detecting a high open-files-number itself or whether plesk does it, but on several systems we have seen that a new Plesk installation can easily run without /etc/nginx/ulimit.global_params file and worker_rlimit in /nginx.conf only, then all the sudden the /etc/nginx/ulimit.global_params file is being created by something which breaks the configuraiton. So it is better to comment out the worker_rlimit line in nginx.conf from start on and create your on ulimit.global_params file. That will give you full control over the settings from start on and prevent this situation.
 
Back
Top