Skip to content
ZenoCloud Call

How to Fix 504 Gateway Timeout Error?

Troubleshoot and fix 504 Gateway Timeout errors in your Magento store.

First written in 2021. Things may have changed since.

A 504 Gateway Timeout error indicates that the server didn't respond within the expected timeframe.

Common Causes

  • Long-running scripts or database queries
  • Server resource limitations
  • Misconfigured proxy servers
  • High server load
  • PHP timeout settings

How to Fix 504 Errors

Try these solutions:

  • Increase PHP execution time limit
  • Optimize database queries
  • Clear Magento cache
  • Disable problematic extensions
  • Check server resources and upgrade if needed
  • Review server error logs
  • Increase server timeout settings

Wrap Up

504 errors often indicate server performance issues that can be resolved through optimization and configuration adjustments.

Next step

Run Magento on infrastructure built for it.

See Magento hosting

Related services

Browse all field notes
Quote request

What should we quote?

Your name, number and what you need. We reply within one business day.