【问题标题】:RubyMine: Termination timed out workerRubyMine:终止超时工人
【发布时间】:2020-03-22 02:39:51
【问题描述】:

我在 docker 中调试我的应用程序时遇到问题。我认为我的设置是正确的,因为没有调试器一切正常。

端口

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"

错误:(网站没有响应)

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

【问题讨论】:

  • 这是什么版本的 RubyMine?

标签: ruby docker remote-debugging rubymine puma


【解决方案1】:

我刚刚想通了。

我的解决方案将 WEB_CONCURRENCY 设置为 0 (config/puma.rb)

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

对于生产系统,我更改了.env 文件中的值。

WEB_CONCURRENCY=2

来源: * 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 }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 2021-08-10
    • 1970-01-01
    • 2021-01-11
    相关资源
    最近更新 更多