I have a Rails 6 api-only application which I am failed to run at AWS Elastic Beanstalk. After deployment of that application, puma stucks with message "Early termination of worker". I don't have any custom configurations nor settings for that project. Simply created an environment and uploaded archived zip file.
After I kill puma processes with command pkill -9 -f puma
my puma.log file looks like below:
=== puma startup: 2020-01-22 13:17:45 +0000 ===
=== puma startup: 2020-01-22 13:17:45 +0000 ===
[28858] Early termination of worker
[28856] Early termination of worker
[28862] Early termination of worker
[28865] Early termination of worker
[28869] Early termination of worker
I searched that error and found nothing for solve.
I am using Puma with Ruby 2.6 running on 64bit Amazon Linux/2.11.2 on AWS.
For the recent update from version 3.1.1 to 3.1.2 of the Ruby 2.6 running on 64bit Amazon Linux 2 platform, after checking the puma log in /var/log/puma/puma.log
in my EC2 instance, it shows what you mention:
[XXXXX] Early termination of worker
[XXXXX] + Gemfile in context: /var/app/current/Gemfile
so, for checking what the actual error is, I entered my app's code folder /var/app/current
and ran
pumactl start
this shows the actual error:
[XXXXX] Unable to load application: Gem::LoadError: You have already activated nio4r 2.5.3, but your Gemfile requires nio4r 2.5.2. Prepending `bundle exec` to your command may solve this.
So, since it says that there is a conflict of nio4r versions, I fixed it by forcing nio4r version to 2.5.3 adding this to my Gemfile:
gem 'nio4r', '2.5.3'
and then running bundle update
, commiting and pushing changes and deploying.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With