• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • 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.

Issue All domains return 504 Gateway Timeout

Kaspar

API expert
Plesk Guru
Server operating system version
AlmaLinux 8.6
Plesk version and microupdate number
18.0.43
I can't wrap my head around the following issue. Somehow all domains on a particular server respond with a 504 Gateway Timeout. In the error logs of a there is the 67850#0: *18 upstream timed out (110: Connection timed out) while connecting to upstream error as you would expect, but there are no other errors.

# service nginx status indicates not errors or issues, Nginx is running. Also nginx -t does not report any issues. Disabling the Smart static files processing option on a domain basis (Example.com > Apache & nginx Settings ) does not solve anything either.

Only when I fully disable Nginx (/usr/local/psa/admin/sbin/nginxmng --disable) all website become accessible again.

Anyone any clues on where to go next with this issue?
 
Last edited:
Are the PHP-FPM services running? Are the domains configured with the correct PHP interface (e.g. via Apache when you are using Apache, via Nginx when you are solely using Nginx)?
 
Are the PHP-FPM services running? Are the domains configured with the correct PHP interface (e.g. via Apache when you are using Apache, via Nginx when you are solely using Nginx)?
Nginx is only used as Proxy. PHP-FPM services run as Apache, but switching it to run as Nginx does not solve it unfortunately.

The strange thing is that this issue even affects domains that only serve static html pages, on which PHP is disabled. This really puzzles me. Looks like Nginx cannot communicate with Apache at all (or the other way around).

Plesk repair web does not solve anything either, nor does it report any errors.

I might reinstall Nginx to see what that does.
 
What about 127.0.0.1?
No, 127.0.0.1 isn't listed either. The issue appears to be bigger then I thought. Mail log is full with
Code:
NOQUEUE: milter-reject: CONNECT from mail-vs1-f45.google.com[209.85.217.45]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
 
Okay, adding the server IP server to the a rule in the Plesk Firewall solves the issues. Strangely enough, removing the rule with the server IP from the firewall does not bring back the issue. Very strange.

Still a mystery why this happend.
 
Last edited:
Hello Kaspar,

I believe that happens because your upstream takes too much to reply to the request and NGINX thinks the upstream already failed in processing the request, so it responds with an error. Just include and increase proxy_read_timeout in the location config block.
According to me, There are two main directives responsible for Nginx upstream timed out (110: Connection timed out) error:
It Defines as a timeout for reading a response from the proxied server. Default is 60 seconds.

.....

location ~ ^/slow-proxy {

proxy_read_timeout 180; # <---

proxy_pass ...;
}

.....


* you can use proxy_read_timeout inside http, server, and location blocks.


And second is fastcgi_read_timeout – Which defines as a timeout for reading a response from the FastCGI server. Default is 60 seconds.

.....

location ~ \.php$ {

fastcgi_read_timeout 180; # <---

fastcgi_pass ...;
}

.....

* you can use fastcgi_read_timeout inside http, server, and location blocks.
 
Back
Top