• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue 504 Gateway Time-out in Apache 2.4.6 + FPM

lepe

Basic Pleskian
Hi

I have problem when I upload images to my website due to 504 Gateway Time-out. This issue come when it is working for more than 60 seconds. According my research it is issue in mod_proxy_fcgi when you have website with Apache 2.4.6 + PHP-FPM from NGINX.

Error.log:
[proxy_fcgi:error] [pid 8509] (70007)The timeout specified has expired:


My first tryout:

1) I added a max_execution_time = 999999 and a default_socket_timeout = 1200

2) I added "fastcgi_read_timeout 1200;" in my website Apache & nginx Settings > Additional Nginx directives

3) I added "request_terminate_timeout = 1200" in /etc/php-fpm.d/www.conf


My second tryout:

I added "timeout=1200" in var/www/vhosts/system/mywebiste/conf/httpd.conf :
<IfModule mod_proxy_fcgi.c>
<Files ~ (\.php$)>
SetHandler proxy:unix:///var/www/vhosts/system/mywebiste/php-fpm.sock|fcgi:/127.0.0.1:9000 timeout=1200
</Files>
</IfModule>

I tried as other 10 options and it dont work, I find other post with a similar problem in PLESK FORUM

Some help please?

best regards
 
Try to increase FastCGI timeout limits like:

# cat /etc/httpd/conf.d/fcgid.conf | grep Time
FcgidIdleTimeout 600
FcgidProcessLifeTime 600
FcgidConnectTimeout 600
FcgidIOTimeout 600
 
Sorry, I tried with these changes and restarting php-fpm, nginx and httpd but it always receive 504 Gateway Time-out after 60 sec
 
This issue may be related to problem with domain resolving/DNS misconfiguration. Try to check it and temporary add record about hostname and corresponding IP address to /etc/hosts
 
Back
Top