Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RubyMine: Termination timed out worker

I´ve a problem to debug my application in docker. My setup is correct I think because without debugger everything works fine.

Ports

command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
    volumes:
      - .:/usr/src/app
    ports:
      - "3000:3000"
      - "1234:1234"
      - "26162:26162"
      - "26168:26168"

The error: (The site is not responding)

Fast Debugger (ruby-debug-ide 0.7.0, debase 0.2.4.1, file filtering is supported) listens on 0.0.0.0:1234
=> Booting Puma
=> Rails 5.2.3 application starting in development 
=> Run `rails server -h` for more startup options
[8] Puma starting in cluster mode...
[8] * Version 4.0.1 (ruby 2.6.2-p47), codename: 4 Fast 4 Furious
[8] * Min threads: 5, max threads: 5
[8] * Environment: development
[8] * Process workers: 2
[8] * Preloading application
[8] * Listening on tcp://0.0.0.0:3000
[8] Use Ctrl-C to stop
[8] ! Terminating timed out worker: 16
[8] ! Terminating timed out worker: 18
[8] ! Terminating timed out worker: 20
[8] ! Terminating timed out worker: 21
[8] ! Terminating timed out worker: 24
[8] ! Terminating timed out worker: 25
[8] ! Terminating timed out worker: 28
[8] ! Terminating timed out worker: 29

enter image description here enter image description here

like image 593
Hu3nn1 Avatar asked Dec 05 '25 17:12

Hu3nn1


1 Answers

I just figured it out.

My solution is set WEB_CONCURRENCY to 0 (config/puma.rb)

workers ENV.fetch("WEB_CONCURRENCY") { 0 }

For the production system I change the value in the .env file.

WEB_CONCURRENCY=2

Source: * https://github.com/JetBrains/sample_rails_app/blob/master/config/puma.rb

# Note that workers are not supported for JRuby or Windows
#workers ENV.fetch("WEB_CONCURRENCY") { 2 }
like image 50
Hu3nn1 Avatar answered Dec 07 '25 07:12

Hu3nn1



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!