3

I am using byebug for debugging my rails application.Debugger stops but continues automatically after some time interval and gives this:

[5188] ! Terminating timed out worker: 5378

  • Worker 0 (pid: 5959) booted, phase: 0

and also when sometimes it makes terminal hang. Please help!

Param
  • 31
  • 5

1 Answers1

4

I could solve that problem by changing worker_timeout in config/puma.rb. It seems that problem is already solved in new rails 6.1 projects using these lines:

# Specifies the `worker_timeout` threshold that Puma will use to wait before
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"

Default is 90 seconds.

The puma documentation says:

Verifies that all workers have checked in to the master process within the given timeout. If not the worker process will be restarted. This is not a request timeout, it is to protect against a hung or dead process. Setting this value will not protect against slow requests.

https://www.rubydoc.info/gems/puma/Puma%2FDSL:worker_timeout

randomcontrol
  • 1,996
  • 1
  • 15
  • 11