hi,
After upgrading from unicorn to puma, i've encounter a strange error;
Sometimes when worker are starting, they start on the bad ruby version, and so causes an error.
This error causes 503 on my application because the worker is not starting properly.
this is my error :
app[web.3]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.5.0/bin/puma)
app[web.3]: SignalException: SIGTERM
But I a not on ruby 2.5.0
Ruby version: 2.5.1
Rails version: 5.1.4
Puma version: 3.11.4
on heroku.
Somebody has an idea ?
After upgrading from unicorn to puma, i've encounter a strange error;
Sometimes when worker are starting, they start on the bad ruby version, and so causes an error. It seems to be random...
This error causes 503 on my application because the worker is not starting properly.
this is my error :
app[web.3]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.5.0/bin/puma)
app[web.3]: SignalException: SIGTERM
But I a not on ruby 2.5.0
System configuration:
Ruby version: 2.5.1
Rails version: 5.1.4
Puma version: 3.11.4
( on heroku )
Somebody has an idea ?
EDIT :
Procfile :
web: bundle exec puma -C config/puma.rb
worker: bundle exec rake jobs:work
shoryuken_worker: bundle exec shoryuken -R -C config/shoryuken.yml
puma.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
end
Gemfile : gem 'puma'
Hey, having the same issue here, with the same system configuration except for rails, which is 4.2.10
Same here on heroku when dynos are restarted:
ruby 2.5.0p0
puma 3.11.2
EDIT: Related https://github.com/puma/puma/issues/1438#issuecomment-337722378 which seems fixed in bundler 1.16.x Heroku is still using 15.x and I didn't found any painless method to set bundle config disable_exec_load true on heroku.
@kendrikat in your heroku cli run:
heroku config:set "BUNDLE_DISABLE_EXEC_LOAD"="true"
See also #1438
Most helpful comment
@kendrikat in your heroku cli run:
heroku config:set "BUNDLE_DISABLE_EXEC_LOAD"="true"