nginx timeout_error ai_generated true

504 Gateway Timeout

ID: nginx/504-gateway-timeout

Also available as: JSON · Markdown
78%Fix Rate
83%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1 active

Root Cause

Upstream server too slow to respond.

generic

Workarounds

  1. 88% success Optimize upstream application response time
  2. 85% success Increase timeout for specific slow endpoints only
    location /api/slow { proxy_read_timeout 120s; }

Dead Ends

Common approaches that don't work:

  1. Set proxy_read_timeout extremely high globally 80% fail

    Ties up worker connections

  2. Disable proxy buffering for all locations 75% fail

    Memory spike on large responses