加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 为什么heroku不运行我的procfile进程?

发布时间:2020-12-17 02:44:20 所属栏目:百科 来源:网络整理
导读:当我在localhost上运行foreman start时,Procfile中的所有进程都正常运行: #Procfile web: bundle exec unicorn -p $PORT -c ./config/unicorn.rbresque: env TERM_CHILD=1 QUEUE=* bundle exec rake resque:worksqs_converted: bundle exec rake sqs:listen
当我在localhost上运行foreman start时,Procfile中的所有进程都正常运行:

#Procfile

web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
resque: env TERM_CHILD=1 QUEUE=* bundle exec rake resque:work
sqs_converted: bundle exec rake sqs:listen_converted
sqs_failed: bundle exec rake sqs:listen_failed
$foreman start

13:52:07 sqs_failed.1     | started with pid 3521
13:52:07 web.1            | started with pid 3518
13:52:07 sqs_converted.1  | started with pid 3520
13:52:07 resque.1         | started with pid 3519

但是,当我部署到heroku并运行heroku时,我运行的只是一个web.1实例

=== web: `bundle exec unicorn -p $PORT -c ./config/unicorn.rb`
web.1: up for 8m

无法弄清楚发生了什么……
谢谢

解决方法

您仍然需要使用heroku ps扩展流程:scale resque = 1 sqs_convert = 1 sqs_failed = 1.您可以在Heroku文档中阅读有关扩展流程和可在 Scaling your process formation中使用的命令的所有内容.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读