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

warn_if_in_single_mode incorrectly triggers when WEB_CONCURRENCY >= 1 #3264

Closed
dentarg opened this issue Oct 24, 2023 · 0 comments · Fixed by #3265
Closed

warn_if_in_single_mode incorrectly triggers when WEB_CONCURRENCY >= 1 #3264

dentarg opened this issue Oct 24, 2023 · 0 comments · Fixed by #3265

Comments

@dentarg
Copy link
Member

dentarg commented Oct 24, 2023

#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant