I have the same problem with the same configuration. However I have all the environment variables properly set.
ElasticBeanstalk Ruby 2.7 running on 64bit Amazon Linux 2/3.1.1
No problems in dev, but puma/nginx are not working properly. In /var/app/puma/puma.log, I get the same occurence:
[X] + Gemfile in context: /var/app/current/Gemfile
[X] Early termination of worker
In my case, the problem was a puma dependency that has been silently updated.
I ssm'ed into the machine, executed 'pumactl start' and got an error:
check_for_activated_spec!': You have already activated nio4r 2.5.2, but your Gemfile requires nio4r 2.5.4. Prepending bundle exec` to your command may solve this. (Gem::LoadError)
then I doublechecked the pull request and noticed that the gem nio4r was updated.
The solution was forcing the nio4r to 2.5.2 in the Gemfile.
Hope it is suitable for you too.
Edited by: pedrorgomes on Sep 22, 2020 8:51 AM
A thousand thanks!
follow up question:
upgrading to ElasticBeanstalk Linux 2/3.1.2 broke things again.
have you seen this? thanks!
Beware if you
bundle update in August 2021, as nio4r bumped to version 2.5.8 during the last month, and this doesn't match the version on the current Beanstalk platform Ruby 2.7 AL2 version 3.3.4
Edited by: philayres on Aug 31, 2021 4:35 PM
Can't update environment variables in elastic beanstalk environmentasked a year ago
Restart Elastic Beanstalk App Server when Health is Severeasked 9 months ago
AWS Elastic beanstalkasked 14 days ago
Log file owner is root instead of webapp - Ruby 3 on Elastic Beanstalk on Amazon Linux 2asked 20 days ago
Security Updates for PHP on Elastic Beanstalkasked a year ago
AWS Elastic Beanstalk - Ruby 3.0 running on 64bit Amazon Linux 2/3.4.4 - Wrong PUMA versionasked 8 months ago
Can't run 'rails console' on Elastic Beanstalk Amazon Linux 2Accepted Answerasked 8 months ago
AWS Elastic Beanstalk - Ruby 3.0 running on 64bit Amazon Linux 2/3.4.4 - 100.0 % of the requests are failing with HTTP 5xxasked 8 months ago
`docker build` timeout on AWS Elastic Beanstalkasked 5 months ago
Elastic beanstalk is not reading environment variables.Accepted Answerasked 2 years ago