A 504 Gateway Timeout means a server acting as a gateway (like Nginx or Cloudflare) waited too long for a response from an upstream server and gave up. The upstream server is too slow or unresponsive.
First, check if your internet is working and what your current IP address is:
🔍 Check My IP Address →Like 502, a 504 occurs at the gateway level — but instead of an invalid response, the gateway timed out waiting for any response. The upstream server accepted the connection but took too long to process the request. Common causes: a slow database query locking up the application, an upstream API your site depends on being slow, server overload, a long-running PHP or Python script exceeding timeout limits, or misconfigured timeout settings on the gateway.
Ctrl+F5 and wait 30–60 secondsCtrl+Shift+Delete → clear all → reloadipconfig /flushdns in Command PromptSwitch to Google DNS (8.8.8.8) or Cloudflare (1.1.1.1). DNS delays can make a slow server appear to timeout even faster.
max_execution_time = 300proxy_read_timeout 300s;A CDN like Cloudflare caches responses and serves cached content even when the back-end is slow, preventing 504s from reaching end users.
✅ Fixed it? Visit tools.examineip.com to confirm your IP address and connection are working correctly.
← Back to the complete guide: Internet Errors Hub
Last updated: March 30, 2026 • Report an error