Skip to content
CRASH

HTTP status code

502 Bad Gateway

A proxy, load balancer or CDN in front of your site asked the origin server for the page and got back something it could not use — a crash, a closed connection or garbage.

Common causes

  • The application process crashed or is restarting (PHP-FPM, Node, Gunicorn).
  • The origin closed the connection before sending a full response.
  • The proxy points at the wrong upstream port or host.

How to fix it

  1. Check that the app process is running and look at its logs around the time of the error.
  2. Confirm the proxy upstream address and port match where the app listens.
  3. Raise proxy buffer and header size limits if responses are large.

Related errors

Next time your site goes down, hear it from Crashy first.

Not from a customer. 1 website is free — no card.