Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails debugger exits automatically after some interval, and Ubuntu terminal tab hangs

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!

like image 872
Param Avatar asked Oct 15 '25 09:10

Param


1 Answers

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

like image 101
randomcontrol Avatar answered Oct 18 '25 08:10

randomcontrol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!