• 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

Resolved nginx: [emerg] "proxy_read_timeout" directive is duplicate

Gorgoroth

New Pleskian
Hey guys!

I got this error message, which I don't really understand:

New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] "proxy_read_timeout" directive is duplicate in /var/www/vhosts/system/{domain}/conf/vhost_nginx.conf:3 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.

What I did:

I added a specific set of nginx-options to a subdomain website:

proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;

This went flawlessly and without error message.

I added the same set of nginx-options to another subdomain website (under the same TLD), and suddenly the error appeared.

Removing the options again doesn't remove the error, also no "detailed error descriptions" have been sent to me.

Anyone got a clue what's going on here?

Thanks so much!
 
Hi
this (proxy_read_timeout) gets set when you adjust the PHP timeout's, for the domain/subdomain.
So just remove it from the additional Nginx settings you are adding.
Kind regards

Lloyd
 
Hey Lloyd!

Thanks a lot for your answer - unfortunately, it didn't work yet.

In the PHP-settings for the subdomain, I had max_execution_time and max_input_time on increased settings, too. I reset those to default - no change.
I also removed the proxy_read_timeout value - still no change.

Do apache / nginx need to be restarted? And: will they work afterwards?? For now they do and I am a bit afraid to actually render them inoperable for the time being :)
 
Hey Milan!

I reset PHP settings on both subdomains to default, removed the proxy_read_timeout-option from both nginx settings and reloaded the nginx service: the error persists.

Is there anything I can do to provide more info on this?
 
Can you please disable and enable nginx reverse proxy from the commandline and give me the output?

for disabling
plesk sbin nginxmng -d

for enabling
plesk sbin nginxmng -e
 
There is not much output :D

root@xxxxxx:/# plesk sbin nginxmng -d
root@xxxxxx:/# plesk sbin nginxmng -e
root@xxxxxx:/#

As in: there is no output. Is there a verbose-option?

***EDIT***

The error message in the plesk admin console disappeared, though.
 
No output means, that commands ran successfully.
Can you please check the panel again and check whether the error is there or not?
 
;)

During disabling nginx reverse proxy, it re configures the apache as well as the nginx configuration files.
That fixed the issue.

Cheers!!
 
Hi All
Very useful discussions. I had the same problem today. By removing the duplicate directive from nginx PHP-FPM settings and restarting the services solved this issue
Many thanks
 
Back
Top