Advanced

Troubleshooting: 502 errors, crashes and slow apps

Where to look and the usual causes.

  1. Where to look
  2. 502 Bad Gateway
  3. Crashes and restarts
  4. Changes not showing

Where to look

  • App settings → Logs — your app's own output and errors
  • Logs → Error log — the web server's errors for the site
  • Logs → Access log — every request and its status

502 Bad Gateway

  • The app is not listening on PORT — it must use process.env.PORT / $PORT and 127.0.0.1
  • The start command is wrong — check it in App settings
  • The app crashed on start — read App settings → Logs (missing package? missing variable?)

Crashes and restarts

  • Out of memory — the plan's RAM is a hard limit for the whole account; upgrade the plan or lower memory use
  • Missing environment variable — add it and the app restarts

Changes not showing

Code only: touch tmp/restart.txt. New packages: press Deploy. Behind Cloudflare: purge its cache.

Stuck? Our engineers answer support tickets around the clock. Contact us, or create an account and open a ticket from the dashboard — the same guides are there too.

Next step

Move your site, or your whole cloud estate

Shared hosting you can buy in two minutes. Infrastructure and managed services quoted by an engineer within one business day.