Puma stuck with message “Early termination of worker” on Rails 6 API only project at Elastic Beanstalk

后端 未结 6 475
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-17 11:41

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 o

6条回答
  •  悲&欢浪女
    2021-01-17 12:29

    @Vic's answer is helpful, and you should make sure you have locked in the right Puma version, but it didn't fix my problem. For me, the issue was that a piece of my code called Rails.application.credentials[...], and the credentials weren't setup on the Elastic Beanstalk instance.

    I changed that code to just use ENV variables, e.g., ENV["MY_VAR"], and set those environment variables in the Elastic Beanstalk Configuration->Software settings page.

    Unfortunately, nothing in the logs I could find told me this is where my app was crashing. I had to start with a bare-bones Rails install, and slowly bring over Gems and code from my original project. Each time I added a file, I would use eb deploy to confirm it worked, and finally narrow down the problem to the one particular file that didn't work.

提交回复
热议问题