• 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.

Question Increase 504 Gateway Time-out

Axx67

New Pleskian
Server operating system version
Debian 10.13
Plesk version and microupdate number
18.0.60 #1
Hello!

I have a PHP site hosted on a dedicated Plesk.
I have a function that does a lot of things and takes time (processing a lot of data, etc.).

When I run it in the browser I get a 504 Gateway Time-out error

I tried adding additional directives in nginx settings. But I feel like it's not working.

My final URLs look like this:
The 18 is an id and can change
Code:
https://domain.com/my/slow/function/18?action=launch

I tried this :
NGINX:
location ~ /my/slow/function/(.*) {
    proxy_connect_timeout 600s;
    proxy_send_timeout 600s;
    proxy_read_timeout 600s;
    fastcgi_send_timeout 600s;
    fastcgi_read_timeout 600s;
}

I have a 404 page from plesk

Then, i tried this :
NGINX:
location ~ https://domain.com/my/slow/function/(.*) {
    proxy_connect_timeout 600s;
    proxy_send_timeout 600s;
    proxy_read_timeout 600s;
    fastcgi_send_timeout 600s;
    fastcgi_read_timeout 600s;
}

I no longer have a 404, but the instructions don't seem to be taken into account since I still have a 504.
Nevertheless, the operations of my code are carried out well

Any help ?
 
NGINX:
location ~ /my/slow/function/(.*) {
....
}
This would the accurate location directive, provided your script is also located in the /my/slow/function/ directory.

What happens if you turn off Proxy mode?
 
Last edited:
Have you tested to see if the timeout directives work without a location block?
 
Back
Top