Error message · Any site hosted on Heroku (Rails, Node, Django, PHP…)

“An error occurred in the application and your page could not be served.”

Heroku's router couldn't get a response from your app, so it served its own error page. Behind it is an error code in the logs: H10 (the app crashed), H14 (no web dyno running), H12 (a request took over 30 seconds) or R14/R15 (out of memory). Your code and database are still there; the process that serves them isn't.

Is your site showing it right now?

The free scan loads your page like a visitor and checks for this message, plus broken links, script errors and phone layout. It also walks your signup, booking or contact form, without sending anything.

​

Free, no signup. Usually done in about a minute.

Why it happens

  • The app crashes on startup after a deploy (a missing environment variable, a failed migration, a dependency change)
  • No web dyno is running: it was scaled to zero, or the free plan ended and the dynos stopped
  • A request takes more than 30 seconds, so the router gives up
  • The dyno ran out of memory and was restarted repeatedly
  • An add-on the app needs (database, Redis) was removed or is over its limit

How to fix it

  1. Read the logs

    Run heroku logs --tail --app <name> (or open the app's logs in the dashboard). The line with code=H10, H12, H14 or R14 says which case you're in, and the lines above it show the app's own error.

  2. H14: start a web dyno

    Run heroku ps:scale web=1 --app <name>. If the app had been on a free plan, pick a paid dyno type in the dashboard first (Resources tab).

  3. H10: fix the crash and redeploy

    The error above the H10 line names it: a missing config var (set it under Settings, Config Vars), a migration that didn't run (heroku run rails db:migrate or your framework's equivalent), or a dependency change. Fix it and deploy, or roll back with heroku rollback.

  4. H12: find the slow request

    The log line shows the path that timed out. Move the slow work to a background job, or make the query faster; the 30-second limit can't be raised.

  5. Check add-ons

    Under Resources, check that the database and other add-ons are attached and not over their row or connection limits; a database over its limit refuses connections and the app crashes.

Questions

"There's nothing here, yet" instead of an error

That's Heroku's page for an app with nothing deployed, or a custom domain pointing at an app that was deleted. Check the app exists and the domain is attached under Settings, Domains.

Is my data gone?

No. Heroku Postgres and other add-ons keep their data while the app can't serve. Once the dyno runs again, everything is as it was.

Can Page Canary tell me if this comes back?

Yes. Page Canary checks your key pages every day for this message and others like it, confirms it on a second check, and emails you with the fix. One site is free.

Other error messages