Node.js – Heroku “State changed from starting to down Stopping all processes with SIGTERM”


After booting up my Node.js Heroku app with this Procfile:

web: node www/main.js

I used to get:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within
60 seconds of launch

So I have changed my Procfile to a generic command to get around this, following from here, using:

start: node www/main.js

And I am still getting a shut down after 60 seconds. This is the error(s) now:

2015-01-20T13:04:01.452819+00:00 heroku[worker.1]: State changed from
up to starting
2015-01-20T13:04:02.728905+00:00 heroku[worker.1]: State changed from starting to down
2015-01-20T13:04:03.434251+00:00 heroku[worker.1]: Starting process with command node www/main.js
2015-01-20T13:04:03.874370+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2015-01-20T13:04:05.188100+00:00 heroku[worker.1]: Process exited with status 143
2015-01-20T13:04:05.930916+00:00 app[worker.1]: [Tue Jan 20 2015 13:04:05 GMT+0000 (UTC)] INFO Connecting…
2015-01-20T13:04:06.837197+00:00 app[worker.1]: Welcome to Slack. You are @derpy of
2015-01-20T13:04:06.837559+00:00 app[worker.1]: You are in: #general
2015-01-20T13:04:06.837637+00:00 app[worker.1]: As well as:
2015-01-20T13:04:06.837739+00:00 app[worker.1]: You have 13 unread messages
2015-01-20T13:04:07.526373+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of
2015-01-20T13:04:07.526508+00:00 heroku[worker.1]: Stopping remaining processes with SIGKILL

I am using and have not adapted the code too much. I have tried all the usual things and now I'm asking for help.

The other weird thing is that the Slack bot connects and is running perfectly for those 60 seconds.

Best Solution

socket = io.listen(process.env.PORT);

Do this in your main.js file, and revert back to web: node www/main.js

Related Question