Heroku's "Application error" page doesn't say what went wrong, but its logs do: every failure has a code. Run heroku logs --tail (or open logs in the dashboard) and look for code=. H10: the app crashed or didn't boot in time. H12: a request took longer than 30 seconds. H14: no web dynos are running, usually because they were scaled to zero. R14: the app is using more memory than its dyno allows.
What's the problem
Visitors see Heroku's "Application error" page, or your app returns 503 errors, often right after a deploy or when traffic picks up.
Why it happens
- H10, app crashed: the app threw an error at startup or while running, often a missing config var or a missing dependency.
- H12, request timeout: a slow database query or outside API call.
- H14, no web dynos: web dynos scaled to 0, or no web process defined in the Procfile.
- R14, memory quota exceeded: a memory leak or too many workers for the dyno size.
How to fix it
- Read the logs:
heroku logs --tail, and find thecode=on the failing requests. - For H10, scroll up to the app's own error just before the crash. Check config vars and dependencies.
- For H12, find and speed up the slow request, or move the work to a background worker.
- For H14, scale up with
heroku ps:scale web=1and check your Procfile definesweb. - For R14, reduce memory use or move to a larger dyno.
- Roll back to the previous release if a deploy caused it.
What Preventionlabs checks
One click runs the full report on your domain. For this problem it shows whether your site loads, how fast, and where its redirects go; uptime checked every 5 minutes, with an email when the site goes down and when it is back; up to 50 pages from your sitemap, listing any that fail or are slow, plus broken links on them; your DNS: nameservers, addresses, DNSSEC, and records pointing at services that no longer exist; your domain's registration and expiry date. It has no connection to your host, so check the host's status page and logs as well.
Run your free reportYour first report is free, no card needed. Then A$50 a month, up to 10 domains. Read-only: it never changes anything.
Sources
- Heroku: Heroku Error Codesofficial docs
A crashed web dyno or a boot timeout on the web dyno will present this error.
- Heroku: Heroku Error Codesofficial docs
An HTTP request took longer than 30 seconds to complete.
- Heroku: Heroku Error Codesofficial docs
This is most likely the result of scaling your web dynos down to 0 dynos.
- Heroku: Heroku Error Codesofficial docs
A dyno requires memory in excess of its quota .
- Heroku: Heroku Error Codesofficial docs
To fix it, scale your web dynos to 1 or more dynos: $ heroku ps:scale web=1
- Heroku: Loggingofficial docs
You can tail your logs using --tail (or -t ).
Preventionlabs is independent and not affiliated with Heroku. Product names are used only to describe the problem.
← All of Hosting