2
votes

I have a project that I tried to deploy on Heroku. It runs perfectly find for the first 90 seconds after which it crashes. The error log is:

2017-02-25T16:10:12.697112+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch 2017-02-25T16:10:12.697112+00:00 heroku[web.1]: Stopping process with SIGKILL 2017-02-25T16:10:12.802348+00:00 heroku[web.1]: Process exited with status 137 2017-02-25T16:10:12.812972+00:00 heroku[web.1]: State changed from starting to crashed

C:\Users\potterboi\Desktop\java-app>Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch

The procfile is as follows:

web: java $JAVA_OPTS -Dserver.port=$PORT -jar target/*.jar

I am not using any reference to PORT or anything else in the code. I don't know what is wrong. Could anyone help me figure it out?

1

1 Answers

6
votes

The reason it doesn't work is because you've configured it as web. Since your program isn't a webapp, you need to configure it as a worker process in the Procfile instead. Take a look at https://devcenter.heroku.com/articles/run-non-web-java-processes-on-heroku

You can try the following Procfile which should work:

worker: java -jar target/*.jar