Early termination of worker puma log是什么意思,为什么会发生这种情况?

在我的Elastic Beanstalk实例中,我收到了一个 “早期终止 “的日志。504 状态码响应,每当我访问它。当我跟踪日志时,我在puma应用服务器上看到以下日志。

==> /var/log/puma/puma.log <==
[27240] Early termination of worker
[27245] Early termination of worker
[27249] Early termination of worker
[27253] Early termination of worker
[27257] Early termination of worker
[27261] Early termination of worker
[27265] Early termination of worker
[27269] Early termination of worker
[27273] Early termination of worker
[27277] Early termination of worker

What does Early termination of worker 是什么意思,为什么会发生这种情况?此外,这个日志是否表明了我在远程环境中所面临的超时错误的原因?rails应用和puma在我的本地机器(Mac OS Catalina 10.15)上运行完美。然而,在我的远程Elastic beanstalk环境中,如上所述,我得到了一个超时504的错误,而我在日志中看到的唯一东西是上面的puma日志。

这是我的 gemfile。

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.1'
# Use mysql as the database for Active Record
gem 'mysql2', '>= 0.4.4'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use haml view syntax
gem 'haml-rails'

# the main komponent gem is broken for Rails 6, see:
# https://github.com/komposable/komponent/issues/133
gem 'komponent', github: '0x2C6/komponent'
gem 'elasticsearch', '~> 6.2'
gem 'redis'

# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  gem 'pry-rails'
  gem 'rspec-rails', '~> 3.9'
  gem 'dotenv-rails'
  gem 'awesome_print'
end

group :beta, :production do
  gem 'puma_worker_killer'
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
  gem 'spring-commands-rspec'
   # Avoid polling for changes (Windows)
  gem 'wdm', '>= 0.1.0', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
end

group :test do
  gem 'webmock'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

解决方案:

我的情况的问题是使用的puma的补丁版本不同。

要点是AWS Elastic Beanstalk使用的是 puma 4.3.3 在我使用 puma 4.3.5.

不得不修复版本的 puma 在我的Gemfile中使用的正是 4.3.3 匹配AWS Elastic Beanstalk使用的堆栈,以防止这个错误。

更多细节请见 我的这个回答 的类似问题。

给TA打赏
共{{data.count}}人
人已打赏
解决方案

应用捆绑如何影响应用更新大小

2022-4-20 0:00:11

解决方案

403 - 授权错误 - OAuth2.0 - 访问令牌 - Azure Api For Fhir。

2022-4-20 0:00:13

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索