← All guides PERFORMANCE · 504 Gateway Timeout

Server Overload: When Traffic Spikes Take a Site Down

$ curl -I https://example.com HTTP/1.1 504 Gateway Timeout

Sometimes a site isn't misconfigured at all — it's just getting more traffic than the server can handle at once, and requests start timing out or failing under the load.

What this tends to look like

How to confirm it

If you have access to server monitoring, check CPU usage, memory usage, and open connection counts around the time the issue started. A sudden climb to the ceiling on any of these, correlated with a traffic increase in your analytics, is a strong signal.

What helps, from quick fixes to longer-term ones

Immediate relief

Structural fixes

Quick checklist
  • Check CPU, memory, and connection counts around the failure window
  • Correlate the timing against a traffic spike in analytics
  • Add or verify caching and a CDN for static content
  • Consider auto-scaling if spikes recur