• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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