Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puma::CLI deletes options before Puma::Cluster tries to use them #769

Closed
dovestyle opened this issue Aug 16, 2015 · 0 comments
Closed

Puma::CLI deletes options before Puma::Cluster tries to use them #769

dovestyle opened this issue Aug 16, 2015 · 0 comments

Comments

@dovestyle
Copy link

It seems Puma::CLI.write_state removes a bunch of keys from Runner's @options hash right before Puma::Cluster.spawn_workers is called. I notice the @config.dup being called to output the state without affecting the actual, "stateful" @options, but I think ruby is doing it anyway. It's a weird issue. I am doing a simple 'pp @options' before and after the call to write_state, and the keys being removed from the duped hash are also being removed from the stateful hash. My investigation started with this error:

gems/puma-2.13.2/lib/puma/cluster.rb:107:in `block in spawn_workers': undefined method `each' for nil:NilClass (NoMethodError)
    from gems/puma-2.13.2/lib/puma/cluster.rb:105:in `times'
    from gems/puma-2.13.2/lib/puma/cluster.rb:105:in `spawn_workers'
    from gems/puma-2.13.2/lib/puma/cluster.rb:386:in `run'
    from gems/puma-2.13.2/lib/puma/cli.rb:218:in `run'
    from gems/puma-2.13.2/bin/puma:10:in `<top (required)>'
    from bin/puma:23:in `load'
    from bin/puma:23:in `<main>'
    from bin/ruby_executable_hooks:15:in `eval'
    from bin/ruby_executable_hooks:15:in `<main>'

The @options hash has been stripped of the keys that spawn_workers is trying to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant