gpt4 book ai didi

ruby-on-rails - 使用 worker 启动 Puma 服务器时出错

转载 作者:数据小太阳 更新时间:2023-10-29 06:47:51 26 4
gpt4 key购买 nike

我是 Rails 和 Puma 的新手,所以这个问题对于简单的解决方案来说可能太愚蠢了,如果您认为我做错了什么,也请指导我。

我正在尝试与工作人员一起为我的 Rails 启动 Puma 服务器。如果我将 workers 设置为 0

puma -w0

服务器完美启动,但如果我将 worker 设置为 1 或更多,则会出现以下错误:

E:\RoR_tryouts\ws_13.11.13\todo>puma -w3
[2120] *** SIGUSR2 not implemented, signal based restart unavailable!
[2120] *** SIGUSR1 not implemented, signal based restart unavailable!
[2120] Puma starting in cluster mode...
[2120] * Version 2.7.1, codename: Earl of Sandwich Partition
[2120] * Min threads: 0, max threads: 16
[2120] * Environment: development
[2120] * Process workers: 3
[2120] * Phased restart available
[2120] * Listening on tcp://0.0.0.0:9292

C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/lib/puma/cluster.rb:229:in `trap': unsupported signal SIGCHLD (ArgumentError)
from C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/lib/puma/cluster.rb:229:in `run'
from C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/lib/puma/cli.rb:442:in `run'
from C:/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.7.1/bin/puma:10:in `<top (required)>'
from C:/Ruby/Ruby193/bin/puma:23:in `load'
from C:/Ruby/Ruby193/bin/puma:23:in `<main>'

规范:

  • Windows 7
  • Ruby 1.9.3p448 (2013-06-27) [i386-mingw32] MRI Rail 4.0.0 Puma
  • 2.7.1版本,代号:三明治分区伯爵

最佳答案

是的,我遇到了同样的问题,并在 https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server 找到了解决方案在“ worker ”主题下。如果您使用的是 Windows 或 JRuby,请省略该行 “workers Integer(ENV['WEB_CONCURRENCY'] || 2)”在您的 config/puma.rb 文件中。它为我解决了。阅读上面的链接以获取更多信息。

关于ruby-on-rails - 使用 worker 启动 Puma 服务器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20801734/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com