Error Codes Wiki

HTTP 504 Gateway Timeout — Upstream Server Slow

Critical5xx server error

Overview

HTTP 504 Gateway Timeout means the gateway did not receive a timely response from the upstream server.

Key Details

  • Status: 504 Gateway Timeout
  • Category: 5xx Server Error
  • Upstream server did not respond in time
  • Proxy/gateway gave up waiting

Common Causes

  • Backend server is too slow to respond
  • Database query taking too long
  • Upstream server is overloaded
  • Network issues between proxy and backend

Steps

  1. 1Wait and retry — the backend may be temporarily overloaded
  2. 2Check backend server performance
  3. 3Optimize slow database queries
  4. 4Increase proxy timeout settings if appropriate

Tags

http-status5xx-server-errorhttp-504httpstatus-code

More in 5xx Server Error

Frequently Asked Questions

504 is gateway-to-upstream timeout. 408 is client-to-server timeout.