Error while starting Puma server with workers

hadzy picture hadzy · Dec 27, 2013 · Viewed 9k times · Source

I am new to Rails and Puma, so the issue might be too silly with simple solutions, also please guide me if you think i am doing something wrong.

I am trying to start the Puma server for my rails with the worker. If i set workers to 0 with

puma -w0

the server starts perfectly but if i set worker to 1 or more it gives the following error:

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>'

Specifications:

  • Windows 7
  • Ruby 1.9.3p448 (2013-06-27) [i386-mingw32] MRI Rail 4.0.0 Puma
  • Version 2.7.1, codename: Earl of Sandwich Partition

Answer

David Adafia picture David Adafia · May 6, 2016

yup i had this same issue and found the solution at https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server under the topic 'Workers'. If you're on windows orJRuby omit the line "workers Integer(ENV['WEB_CONCURRENCY'] || 2) " in your config/puma.rb file. it solved it for me. Read the link above for more info.