【问题标题】:Killing abandoned console on Heroku在 Heroku 上杀死废弃的控制台
【发布时间】:2011-09-20 16:21:35
【问题描述】:

我不小心以一种不太优雅的方式关闭了 Heroku 控制台。而现在当我跑步时

heroku ps --app myapp

它显示

run.8         up for 5h           bundle exec rails console
run.9         complete for 15m    bundle exec rails console
web.1         up for 4h           bundle exec unicorn -p $PORT -c ./..
web.2         up for 4h           bundle exec unicorn -p $PORT -c ./..
worker.1      up for 4h           bundle exec rake jobs:work

我有什么方法可以关闭 run.8 进程并停止为一次性的测功机付费?

【问题讨论】:

  • 它是heroku ps --app myapp

标签: console heroku


【解决方案1】:

试试

heroku ps:stop run.8

从另一个 SO 答案中得到这个。

【讨论】:

  • 这对我来说确实适用于 Cedar。 heroku restart 没有终止进程。只需运行heroku ps,获取进程名称,然后运行heroku ps:stop yourprocessname 即可杀死它。
【解决方案2】:

在 Cedar 上运行

heroku ps

得到

Process State Command -------- ---------- -------------- ----------
run.1 up for 16h bundle exec rails console

然后运行

heroku stop run.1

杀死它

将 run.1 替换为上面输出中的进程名称,例如对于网络测功机,它可能是 run.12web.10,对于工作人员可能是 worker.16

【讨论】:

    【解决方案3】:

    您是否尝试过仅重新启动应用程序 - 可以这样做吗?

    heroku restart
    

    【讨论】:

    • 只是为了跟进这一点 - 我最近遇到过这种情况,发现重新启动应用程序并没有真正清除它们。我在支持下记录了它,并被告知实际上没有办法杀死这些进程,并且所有进程每 24 小时重新启动一次。
    猜你喜欢
    • 2011-12-06
    • 1970-01-01
    • 2011-01-31
    • 2018-03-09
    • 2017-11-20
    • 1970-01-01
    • 1970-01-01
    • 2014-06-21
    • 2012-02-29
    相关资源
    最近更新 更多