Heroku的“状态从开始更改为向下.使用SIGTERM停止所有进程". [英] Heroku "State changed from starting to down Stopping all processes with SIGTERM"

查看:224
本文介绍了Heroku的“状态从开始更改为向下.使用SIGTERM停止所有进程".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用此Procfile启动Node.js Heroku应用后:

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

web: node www/main.js

我曾经得到:

错误R10(引导超时)-> Web进程未能绑定到$ PORT中 启动60秒

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

因此,我已从这里,使用:

start: node www/main.js

60秒后,我仍然无法关机.这是现在的错误:

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]:状态从 直到开始 2015-01-20T13:04:02.728905 + 00:00 heroku [worker.1]:状态从开始更改为关闭 2015-01-20T13:04:03.434251 + 00:00 heroku [worker.1]:使用命令node www/main.js启动进程 2015-01-20T13:04:03.874370 + 00:00 heroku [worker.1]:使用SIGTERM停止所有进程 2015-01-20T13:04:05.188100 + 00:00 heroku [worker.1]:进程退出,状态为143 2015-01-20T13:04:05.930916 + 00:00 app [worker.1]:[2015年1月20日星期二13:04:05 GMT + 0000(UTC)]信息正在连接... 2015-01-20T13:04:06.837197 + 00:00 app [worker.1]:欢迎使用Slack.您是@derpy的 2015-01-20T13:04:06.837559 + 00:00 app [worker.1]:您位于:#general 2015-01-20T13:04:06.837637 + 00:00 app [worker.1]:以及: 2015-01-20T13:04:06.837739 + 00:00 app [worker.1]:您有13条未读邮件 2015-01-20T13:04:07.526373 + 00:00 heroku [worker.1]:错误R12(退出超时)->至少一个进程未能在10秒内退出 SIGTERM 2015-01-20T13:04:07.526508 + 00:00 heroku [worker.1]:使用SIGKILL停止其余进程

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并没有过多地修改代码.我已经尝试了所有常规操作,现在正在寻求帮助.

I am using https://github.com/slackhq/node-slack-client and have not adapted the code too much. I have tried all the usual things and now I'm asking for help.

另一个奇怪的事情是Slack僵尸程序已连接并在60秒钟内完美运行.

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

推荐答案

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

在您的main.js文件中执行此操作,然后返回到Web:节点www/main.js

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

这篇关于Heroku的“状态从开始更改为向下.使用SIGTERM停止所有进程".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆