0

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?

Timothy Fisher
  • 1,001
  • 10
  • 27
  • Cloudflare has a hard-set timeout that you cannot change, no matter what you change on your server, though I believe it's 100 seconds on their end. The only way to get around it is to bypass Cloudflare, such as with a subdomain. – aynber Jan 17 '22 at 20:38
  • Even if I switch off the "Proxy" setting for the subdomain? It's a "dev" subdomain and I've switched off the "Proxy" toggle in Cloudflare. – Timothy Fisher Jan 17 '22 at 20:39
  • There is also the [Timeout directive](https://stackoverflow.com/questions/26742580/504-gateway-time-out-the-server-didnt-respond-in-time-how-to-fix-it) in Apache – aynber Jan 17 '22 at 20:40
  • The "Proxy Status" for the dev subdomain is set to "DNS Only". I also have set the Timeout directive in httpd.conf to `18000` as well. – Timothy Fisher Jan 17 '22 at 20:43

2 Answers2

0

Try to make changes in .user.ini and .htaccess files. Search for memory_limit and max_execution_time

bart
  • 321
  • 2
  • 9
0

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.

Timothy Fisher
  • 1,001
  • 10
  • 27