Plesk users may notice “AH01075: Error sending request” and “504 Gateway Timeout” or “503 Service Temporarily Disabled” error in the domain error logs on the website.
As part of our Server management services, we help our customers with several Plesk surveys.
Let us discuss both cases differently today.
Plesk “AH01075: Error sending request to”
Moving forward, let’s see how Support techniques go through these mistakes.
503 The service is temporarily unavailable in Plesk
Symptoms of this error include:
- The /Var/www/vhosts/example.com/logit/error_log file shows:
[proxy_fcgi:error] [pid 350:tid 139649016084224] (104)Connection reset by peer: [client 203.0.113.2:58642] AH01075: Error dispatching request to :, referer: http://example.com/wordpress/wp-admin/upload.php
- The output of the `dmesg` command shows:
[4289853.349670] php-cgi: segfault at 30 ip 00007fc662113088 sp 00007fc630ad3d10 error 4 [4289853.349672] in libMagickCore.so.5.0.0[7fc661f8e000+237000]
An ImageMagick library error can cause this error.
To fix this, we will disable the Imagick PHP module for the PHP handler on the website:
- You can do so by logging in to Plesk
- Browse Tools and Settings> PHP Settings
- Then click PHP handler set in a domain, eg PHP 5.6:
- Disable the extension me remove selection Imagick checkbox:
Later, we will make sure that no site uses this module.
Note that these settings are common 5.6.36 CGI applications, 5.6.36 FastCGI applications. The settings apply to all websites that use these handlers.
504 Gateway timeout on website
Symptoms of this error include:
- The site example.com is not available. We found an error in the browser below:
504 Gateway Time-out
- In the domain error log file Domains> example.com> Logs, we see an error:
[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/gallery
- in Plesk> Domains> example.com> PHP settings it indicates that the website uses a “FastCGI application” (not an “FPM application”) PHP handler.
This error can be caused by PHP code running on the website that takes longer than the specified timeout.
You can fix the problem by adding a timeout. We can raise FastCGI limits only for that domain or at the server level.
Raise FastCGI limits for a single domain:
- Log in to Plesk
- Go then Domains> example.com> Apache and Nginx settings.
- We will add the following lines to the text fields Additional directives for HTTP and Additional directives for HTTPS:
FcgidIdleTimeout 1200 FcgidProcessLifeTime 1200 FcgidConnectTimeout 1200 FcgidIOTimeout 1200 Timeout 1200 ProxyTimeout 1200
However, if the website still shows “504 Gateway Timeout,” we will raise the timeouts to higher values.
- Finally, we click ALRIGHT apply the changes.
Raise FastCGI restrictions across the server:
- We connect to the Plesk server via SSH as an administrator.
- Then open the FastCGI configuration file fcgid.conf in a text editor. The location of the file depends on the operating system:
(a) CentOS / RHEL / CloudLinux distributions:
(b) Debian / Ubuntu distributions:
- Finally, we raise the FastCGI timeout limits:
FcgidIdleTimeout 1200 FcgidProcessLifeTime 1200 FcgidConnectTimeout 1200 FcgidIOTimeout 1200
- If we use the FPM PHP handler to create /etc/httpd/conf.modules.d/00-proxy_timeout.conf, the following lines are added:
Timeout 1200 ProxyTimeout 1200
- The configuration is then tested with the “apachectl configtest” command. The result is similar to:
# apachectl configtest Syntax OK
- Then we restart Apache:
a) CentOS / RHEL based operating systems:
# service httpd restart
(b) Debian / Ubuntu based operating systems:
# service apache2 restart
[Need help with the fix? We’d be happy to assist]
In short, we saw how Support techniques fixes Plesk error.
var google_conversion_label = “owonCMyG5nEQ0aD71QM”;