IT Toolbox
Menu
HomeOne site returns 502 Bad Gateway
Troubleshooting

One site returns 502 Bad Gateway

The proxy or front server does not get a valid response from the upstream application server

TopicIT troubleshooting → About 1 min read

The proxy or front server does not get a valid response from the upstream application server.

Likely causes

  • Upstream application service stopped or unavailable
  • PHP-FPM worker pool unavailable
  • Upstream connection reset or invalid protocol
  • Reverse proxy pointing to the wrong backend
  • Application resource exhaustion

Checks to perform

  1. Identify the component returning HTTP 502 (reverse proxy, load balancer or CDN).
  2. From that component, test the upstream host, network port and expected HTTP/HTTPS scheme.
  3. Correlate proxy error logs with application logs at the same timestamp.
  4. Check CPU, memory, worker capacity and recent deployment or certificate changes.

Recommended fixes

  • Restore the failed upstream service after collecting relevant logs.
  • Correct the upstream DNS name, network port or proxy configuration.
  • Address performance bottlenecks before modifying timeouts.
Support the development of BAOI Hosting, domains and new IT resources.
❤️ Support BAOI

My favorites