Teksolvr
Back to Home

HTTP Code: 504 (Gateway Timeout)

HTTP Status Code Reference

Status Category

5xxServer Error

Meaning & Definition

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server it accessed in attempting to fulfill the request.

Common Causes

  • Extremely slow database query executions
  • Slow network links between proxy gateways
  • Exhausted upstream application execution timeouts

How to resolve HTTP code errors

1. Inspect Logs: Check server logs (e.g. error.log) to locate runtime exceptions or database disconnects.

2. Test Endpoint: Use our Uptime Checker or redirects prober to verify response headers and payload size.

3. Configure Rules: Implement custom redirect rules or error fallback paths below in Nginx/Apache config.

Nginx Configuration Setup

proxy_read_timeout 60s;
proxy_connect_timeout 60s;

Apache Configuration Setup

ProxyTimeout 60