AnthonyLay

Registered
Jun 5, 2020
2
0
1
UK
cPanel Access Level
Root Administrator
Hi,

I awoke to this Error on 4 Servers this morning:

Error: [2021-07-08 08:07:19 +0100] info [restartsrv_nginx] systemd failed to start the service “nginx” (The “/usr/bin/systemctl restart nginx.service --no-ask-password” command (process 40197) reported error number 1 when it ended.): Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. Waiting for “nginx” to start ………failed. Cpanel::Exception::Services::StartError Service Status undefined status from Cpanel::ServiceManager::Services::Nginx Service Error (XID ymz45k) The “nginx” service failed to start. Startup Log Jul 08 08:07:19 whm1.itderby.co.uk systemd[1]: Starting nginx - high performance web server... Jul 08 08:07:19 whm1.itderby.co.uk nginx[40198]: nginx: [emerg] "client_max_body_size" directive is duplicate in /etc/nginx/conf.d/maxuploadsize.conf:1 Jul 08 08:07:19 whm1.itderby.co.uk systemd[1]: nginx.service: control process exited, code=exited status=1 Jul 08 08:07:19 whm1.itderby.co.uk systemd[1]: Failed to start nginx - high performance web server. Jul 08 08:07:19 whm1.itderby.co.uk systemd[1]: Unit nginx.service entered failed state. Jul 08 08:07:19 whm1.itderby.co.uk systemd[1]: nginx.service failed. Log Messages Jul 8 08:07:19 whm1 nginx: nginx: [emerg] "client_max_body_size" directive is duplicate in /etc/nginx/conf.d/maxuploadsize.conf:1 nginx has failed. Contact your system administrator if the service does not automagically recover.

Tried to Restart NGINX and it didn't. I removed NGINX and everything is now working.

Anyone else had the same issue?
 
Last edited by a moderator:

deddy

Well-Known Member
Oct 13, 2003
147
1
168
/etc/nginx/conf.d/maxuploadsize.conf was the problem.

To disable NGINX cache was not able to fix the problem. For what is the disable button available?

All websites were unreachable although Apache was running.

First of all, we removed the NGINX cache. Reinstalling it was pointless.

The fix for the problem was #client_max_body_size 50M;

When is the problem finally solved?