A 502 Bad Gateway error means a gateway or proxy received an invalid response from an upstream server.
Common causes
- The application server is stopped or restarting.
- The upstream server timed out or returned malformed data.
- A reverse proxy or CDN points to the wrong origin.
- DNS, TLS, or network connectivity between services is failing.
How to investigate
- Check your hosting provider's status page for an incident.
- Inspect application logs and proxy/CDN origin logs for the same timestamp.
- Confirm the application process is running and listening on the expected port.
- Verify origin hostnames, DNS records, TLS settings, and proxy configuration.
- Restart or redeploy only after checking logs and the likely cause.
If you are only a visitor, retry after a short wait or contact the website owner. Repeated refreshes cannot fix a persistent upstream problem.