Website error guides / Server errors

502 Bad Gateway: what it means and how to fix it

In short: the web server (or a proxy or CDN in front of the site) is working, but the application it passes requests to gave no valid answer.

Common causes

How to fix it

  1. Restart the application server (for example PHP-FPM) and check its log.
  2. Check the server’s memory and CPU; an overloaded server often causes 502s.
  3. If a CDN such as Cloudflare shows the error, open the site directly on the server to see where it fails.

Who to contact: your hosting provider or web developer.

Know before your visitors do

PingTurret checks your site from several locations every minute. When it goes down, the alert says the likely cause and who to contact. Free for up to 20 monitors.

Related errors