从独角兽升级到美洲狮之后,我遇到了一个奇怪的错误;
有时候,当工作人员开始工作时,他们会开始使用错误的ruby版本,因此会导致错误。似乎是随机的..。
此错误导致503在我的应用程序,因为工人没有正确启动。
这是我的错误:
app[web.3]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.5.0/bin/puma)
app[web.3]: SignalException: SIGTERM但我不是在红宝石2.5.0上
系统配置:
Ruby版本: 2.5.1
Rails版本: 5.1.4
美洲狮版本: 3.11.4
(关于heroku )
有人有主意吗?
编辑:
Procfile:
web: bundle exec puma -C config/puma.rb
worker: bundle exec rake jobs:work
shoryuken_worker: bundle exec shoryuken -R -C config/shoryuken.ymlpuma.rb:
workers Integer(ENV['WEB_CONCURRENCY'] || 4) # WEB_CONCURRENCY = 3
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 4) # RAILS_MAX_THREADS = 5
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RAILS_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
endGemfile:gem 'puma'
Gemfile.lock:puma (3.11.4)
发布于 2018-08-08 23:05:26
https://stackoverflow.com/questions/50064295
复制相似问题