PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 22, 2022

[FIXED] How can I troubleshoot a 504 timeout error using Magento, Apache, PHP-FPM, and Varnish?

 August 22, 2022     apache, fastcgi, http-status-code-504, magento2, php     No comments   

Issue

I have a Magento website and am trying to start a backend process in the admin panel (in my browser) that, when submitted, warns you that the process "can take a long time". Whenever I hit submit though, I end up with a 504 timeout error and can't figure out why.

I've increased my PHP max_execution_time to 1800 seconds, but the request times out after exactly 60 seconds. I am using Cloudflare as a proxy, however even when I turn the proxy setting off, I still get a timeout after 60 seconds. The server is a Cloud Compute type on Vultr. Due to (this question) I've also checked and made sure there aren't any load balancers behind this.

I've tried checking the php-fpm and apache logs but can't find anything relevant to a 504.

How can I begin to troubleshoot this and allow the process to run as long as it needs?


Solution

I did end up figuring this out. It turns out that a load balancer called HAProxy was bound to listen on port 443 for SSL and this had its own configuration options, specifically Timeout Server as described here. I found this with netstat -ltnp and with the help of this other question that I asked. After I increased this option and restarted the service, the operation worked.



Answered By - Timothy Fisher
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing