504 Gateway Timeout Print

  • performance, troubleshooting, cpanel, database, plugins, guide, howto, solution
  • 0

The upstream process took too long to respond.

WHAT IT MEANS

Your application started work and did not finish within the allowed time.

COMMON CAUSES

A slow database query, usually missing an index An external API call with no timeout A large import or export running in the request A script in an infinite or very long loop Resource contention

WHAT TO CHECK

What were you doing when it occurred? An import, a bulk operation, or an ordinary page load?

If it is one specific operation, that operation is too slow for a web request and belongs in a background task or the command line.

IF IT IS ORDINARY PAGES

Something is genuinely slow. Profile the site: a profiling tool shows which queries and which plugins consume the time.

Check for an external service being called during page load. If their server is slow, yours appears slow.

RAISING THE LIMIT

max_execution_time in cPanel > MultiPHP INI Editor. This treats the symptom.

Appropriate for a one-off import. Not appropriate as a permanent fix for slow pages.

THE REAL FIX

Find what is slow. A single unindexed query on a grown table is the most common answer.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot