Error Pages

Errors happen. Knowing how to distinguish between a problem with the Heroku platform and an error in your application can save you time and effort in getting to the source of the problem and restoring service. Heroku takes advantage of the HTTP response’s status code to convey information about different classes of errors:

Internal Server Error (HTTP 500)

This indicates an error inside your application. Common causes are broken gem dependencies, syntax errors, and argument errors. Use “heroku logs” to diagnose the problem, and implement a fix. See logs and exceptions for more information.

App Failed To Respond (HTTP 502)

When you see an HTTP 502 error, it means your app failed to properly respond to an incoming request. In this case, you will see one of the following pages:

App Failed to Boot

Your app failed to start up. A 502 status is returned with a page displaying the app’s crashlog. Use the backtrace to locate the problem (typically a missing gem, or a bad line in your config somewhere) and push a fix.

You will also see this page if your app crashes unexpectedly due to an uncaught exception, or perhaps broken code injected at runtime.

While your app is crashed, you can still run rake tasks via `heroku rake`, but console commands are not possible.

App Failed to Respond

Your app has closed the connection abruptly or issued a zero-length response. The most common cause of this error is a gem with native extensions having memory issues (segfault). While Ruby handles memory errors gracefully, this is not always the case for gems with native extensions. Examine your gems and configuration.

Request Timeout

Your dyno is taking more than 30 seconds to respond to a request. Check the performance page for more on how to avoid request timeouts.

Backlog Too Deep (HTTP 504)

Your dynos cannot keep up with the current request volume. See the performance page for more information.

Maintenance Mode (HTTP 422)

You have put your app in maintenance mode.

Heroku Ouchie Page (HTTP 503)

In the event of a Heroku platform error or system outage, an HTTP 503 status code is returned with an Ouchie Guy, like this:

While all the other errors on this page are problems with your application code, a 503 error code indicates that something is wrong with Heroku, and not with your app. If the problem persists, please open a support ticket or send an email to support@heroku.com.