Skip to content

warn_if_in_single_mode incorrectly triggers when WEB_CONCURRENCY >= 1 #3264

@dentarg

Description

@dentarg

#3256 managed to fix this bug for the --workers flag

$ echo 'app { [200, {}, ["OK"]] }; on_worker_boot { puts "hi from worker" }' | WEB_CONCURRENCY=2 ruby -Ilib bin/puma --config /dev/stdin --port 13080
Warning: You specified code to run in a `on_worker_boot` block, but Puma is not configured to run in cluster mode (worker count > 0 ), so your `on_worker_boot` block did not run
[68210] Puma starting in cluster mode...
[68210] * Puma version: 6.4.0 (ruby 3.2.2-p53) ("The Eagle of Durango")
[68210] *  Min threads: 0
[68210] *  Max threads: 5
[68210] *  Environment: development
[68210] *   Master PID: 68210
[68210] *      Workers: 2
[68210] *     Restarts: (✔) hot (✖) phased
[68210] * Preloading application
[68210] * Listening on http://0.0.0.0:13080
[68210] Use Ctrl-C to stop
[68211] + Gemfile in context: /Users/dentarg/src/puma/Gemfile
hi from worker
[68210] - Worker 0 (PID: 68211) booted in 0.0s, phase: 0
[68212] + Gemfile in context: /Users/dentarg/src/puma/Gemfile
hi from worker
[68210] - Worker 1 (PID: 68212) booted in 0.0s, phase: 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions