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
- Identify the component returning HTTP 502 (reverse proxy, load balancer or CDN).
- From that component, test the upstream host, network port and expected HTTP/HTTPS scheme.
- Correlate proxy error logs with application logs at the same timestamp.
- 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.