Help us understand the problem. What is going on with this article?

byebugでデバッグ中に「Terminating timed out worker」が出る問題の解決

More than 1 year has passed since last update.

問題

Byebugでブレークポイントを置いてデバッグしている時に、
「Terminating timed out worker」 というメッセージが出て
デバッグ状態が解除されてしまう。

原因

サーバーのPumaのWorkerがタイムアウトすることが原因。

解決

PumaのWorkerのタイムアウト時間を伸ばしてあげればよい。
(デフォルトでは60秒)
Pumaの設定ファイル(config/puma.rb)に以下の一行を追加する。

worker_timeout 500
config/puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
threads threads_count, threads_count

preload_app!

rackup      DefaultRackup
port        ENV['PORT']     || 3000
environment ENV['RACK_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

worker_timeout 500

参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした