HTTP 502 Bad Gateway — Upstream Server Error
Critical5xx server error
Overview
HTTP 502 Bad Gateway means a gateway or proxy received an invalid response from the upstream server.
Key Details
- Status: 502 Bad Gateway
- Category: 5xx Server Error
- Proxy/gateway received invalid upstream response
- Usually a backend server issue
Common Causes
- Backend server crashed or is down
- Upstream server returned an invalid response
- Load balancer cannot reach backend
- PHP/Node/Python process died
Steps
- 1Wait and retry — often temporary
- 2Check if the backend server is running
- 3Review upstream server logs
- 4Verify load balancer and proxy configuration
Tags
http-status5xx-server-errorhttp-502httpstatus-code
More in 5xx Server Error
http-500-internal-server-errorHTTP 500 Internal Server Error — What It Means & How to Fix It
Criticalhttp-501-not-implementedHTTP 501 Not Implemented — What It Means & How to Fix It
Criticalhttp-502-bad-gatewayHTTP 502 Bad Gateway — What It Means & How to Fix It
Criticalhttp-503-service-unavailableHTTP 503 Service Unavailable — What It Means & How to Fix It
Criticalhttp-504-gateway-timeoutHTTP 504 Gateway Timeout — What It Means & How to Fix It
Criticalhttp-505-http-version-not-supportedHTTP 505 HTTP Version Not Supported — What It Means & How to Fix It
CriticalFrequently Asked Questions
Usually the backend application crashed or is overloaded.