Troubleshooting 502/504 Gateway Timeouts

2 min read

Overview #

A 502 Bad Gateway or 504 Gateway Timeout means your site’s web server couldn’t get a response from the application in time. For WordPress sites, this is almost always a PHP/application issue: not a “broken website.” This article explains what causes it and what Xponent does about it.

What Causes It #

Cause Description
PHP worker exhaustion A spike in traffic or a heavy process consumed all available PHP workers
Slow plugin/query A plugin or database query taking longer than the timeout window
Memory limit hit A request exceeded the PHP memory ceiling
Server maintenance A deploy, PHP version switch, or server restart

What We Do (And What You Should Do) #

  1. Do nothing: most timeouts self-heal in seconds. Hard-refresh after 30 seconds.
  2. If it persists past a few minutes, contact support with:
    – The exact error (502 or 504)
    – What you were doing when it happened
    – Whether it’s site-wide or one page
  3. Our team checks PHP-FPM logs, worker counts, and resource usage on the GridPane control panel, then applies the fix (worker tuning, cache adjustments, or identifying the heavy plugin).

Common “Footguns” #

Symptom Cause Fix
502 only on one page That page runs a heavy query/plugin We isolate and optimize that page’s elements
504 on form submission PHP max_execution_time too low for the task We raise the limit via GridPane
Errors after a plugin update The update introduced a slow/broken routine We roll back or patch the plugin

The Xponent Standard #

Xponent sites run on managed GridPane infrastructure with tuned PHP-FPM pools and OpenLiteSpeed. Most transient 502/504 errors resolve themselves within seconds as PHP workers recover. We monitor uptime every 15 minutes via Better Stack, so if your site goes down, our team is already on it before you notice.

Related Articles #

Updated on August 31, 2026