Bad Gateway 502
Reference guide
Request path
- You (reached)
- DNS (reached)
- Cloudflare edge (reached)
- Origin (answered with a warning)
502
Likely cause
The origin returned an invalid response to whatever is in front of it — Cloudflare, or the origin's own reverse proxy/load balancer.
What to do
- Check. Check the origin's own reverse proxy/load balancer logs (e.g. nginx, HAProxy) for the upstream connection that failed, and check whether the actual application server process is running.
- Fix. Restart or fix the failing upstream application server/process, or correct the proxy's upstream configuration if it's pointing at the wrong address.
- Verify. Retry the request and confirm it now reaches the application successfully.