英雄联盟“=10=”

Heroku "State changed from starting to down Stopping all processes with SIGTERM"

使用此 Procfile 启动我的 Node.js Heroku 应用程序后:

web: node www/main.js

我曾经得到:

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

因此,我已将我的 Procfile 更改为通用命令来解决此问题,遵循 here,使用:

start: node www/main.js

我仍然在 60 秒后关机。这是现在的错误:

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 SIGTERM 2015-01-20T13:04:07.526508+00:00 heroku[worker.1]: Stopping remaining processes with SIGKILL

我正在使用 https://github.com/slackhq/node-slack-client 并且没有对代码进行太多调整。我已经尝试了所有常见的事情,现在我正在寻求帮助。

另一件奇怪的事情是 Slack 机器人连接并且 运行 在这 60 秒内完美无缺。

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

在您的 main.js 文件中执行此操作,然后恢复为网络:节点 www/main.js