HTTP
504 Gateway Timeout
The server, acting as a gateway or proxy, did not receive a timely response from the upstream server.
When You See This Code
When an upstream server is too slow to respond within the proxy's timeout window.
How to Fix
Increase proxy timeout settings. Optimize upstream server performance. Check for long-running queries.
Specification
View RFC / Specification →Related Codes
Cross-Protocol Equivalents
Comparisons
Guides
Understanding HTTP Status Codes: A Complete Guide
HTTP Fundamentals
HTTP Redirects: 301 vs 302 vs 307 vs 308
HTTP Fundamentals
HTTP Caching: Cache-Control, ETags, and 304 Responses
HTTP Fundamentals
Choosing the Right HTTP Status Codes for REST APIs
API Design
gRPC Status Codes: A Practical Guide
API Design
Debugging 502 Bad Gateway Errors
Debugging & Troubleshooting
Debugging CORS Errors: A Developer's Guide
Debugging & Troubleshooting
Debugging Timeout Errors: 408 and 504
Debugging & Troubleshooting
401 Unauthorized vs 403 Forbidden: When to Use Each
Security & Authentication
Essential HTTP Security Headers
Security & Authentication
Complete Guide to HTTP Methods: GET, POST, PUT, PATCH, DELETE
HTTP Fundamentals
Essential HTTP Headers Every Developer Should Know
HTTP Fundamentals
HTTP/2 vs HTTP/3: What Changed and Why
HTTP Fundamentals
How to Implement and Handle Rate Limiting (429)
API Design
API Versioning Strategies: URL, Header, and Query Param
API Design
Designing Consistent API Error Responses
API Design
Debugging 503 Service Unavailable Errors in Production
Debugging & Troubleshooting
TLS/SSL Certificate Troubleshooting Guide
Debugging & Troubleshooting
OAuth 2.0 Flows Explained: Authorization Code, Client Credentials, PKCE
Security & Authentication
JSON Web Tokens: Structure, Signing, and Common Pitfalls
Security & Authentication
API Keys vs OAuth vs JWT: Choosing the Right Auth Method
Security & Authentication