Question: Website on Plesk server is not accessible: 504 Gateway Time-out: The timeout specified has expired: [client 203.0.113.2:54693] AH01075: Error dispatching request to
Applicable to:Symptoms- Website example.com is not accessible. The following error is shown in a browser:
504 Gateway Time-out- The following error message appears in the domain error log file at Domains > example.com > Logs:
[proxy_fcgi:error] [pid 42290:tid 140458047010560] (70007)The timeout specified has expired: [client 203.0.113.2:54693] AH01075: Error dispatching request to :, referer: http://example.com/galleryCauseExecution PHP code of the website takes longer than the specified timeout.
ResolutionTo fix the issue increase the timeout. FastCGI limits can be increased for an affected domain only or on a server-wide level. Both ways are described below.
Note: In case it is necessary to run only one script with the increased timeout, consider running it in a scheduled task: How to schedule a task in Plesk for Linux?
Increasing the FastCGI limits for a single domain1.Log into Plesk
2.In Plesk, go to Domains > example.com > Apache & nginx Settings.
3.Add the following lines to the text boxes Additional directives for HTTP and Additional directives for HTTPS:
FcgidIdleTimeout 1200
FcgidProcessLifeTime 1200
FcgidConnectTimeout 1200
FcgidIOTimeout 1200
Timeout 1200
ProxyTimeout 1200
Note: If the website still shows "504 Gateway Timeout" try increasing timeouts to higher values.
4.Click OK button to apply the changes.
Increasing the FastCGI limits server-wide
1.Connect to the Plesk server via SSH as root user.
2.Open the FastCGI configuration file fcgid.conf in a text editor with a text editor such as "vi" or "nano". Location of the file depend on operating system:
- for CentOS/RHEL/CloudLinux distributions:
/etc/httpd/conf.d/fcgid.conf- for Debian/Ubuntu distributions:
/etc/apache2/mods-enabled/fcgid.conf
3.Increase FastCGI timeout limits as shown below:
FcgidIdleTimeout 1200
FcgidProcessLifeTime 1200
FcgidConnectTimeout 1200
FcgidIOTimeout 12004.Test configuration with "apachectl configtest" command, and it should return the following:
# apachectl configtest
Syntax OK
5.Restart Apache:
- for CentOS/RHEL-based operating systems:
# service httpd restart
- for Debian/Ubuntu-based operating systems:
# service apache2 restart