Why does my Java app crash with an R10 error?

Issue

Your Java application is failing to start within the allotted boot timeout limit. This is either because it is binding to a port (such as 8080) other than the one provided by Heroku via the $PORT environment variable or because the app takes too long before it binds to this port.

Resolution

First, ensure that your application is binding to the port defined by the $PORT environment variable. How you do this will depend on the server and framework you are using. See the Dev Center documentation on Setting the HTTP Port for Java Applications for more detailed information.

If you are binding to the correct port, then you may need to reduce the amount of time it takes for your app to boot. The most common way to do this is by moving your database migrations to the Heroku release phase. You can read about how to do this in our Dev Center guide to Running Database Migrations for Java Apps.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2018 Salesforce.com