Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There's a bug related to #2018. Essentially, if the
nio4r
gem is ever loaded into the puma master process, it makes it impossible to do things like upgradenio4r
during a phased restart and also makes it impossible to remove the gems from disk without breaking phased restarts. Those problems were addressed mostly by my own #2427.In PR #2427, I was pretty sure I made it so that if you're running a puma cluster with
--prune-bundler
, the puma master process would never loadnio4r
. It turns out that actually, if you enable the status server, the puma master process ends up loadingnio4r
-- the status server is launched in a thread in the master process. Since the status server just uses its own instance ofPuma::Server
, that ends up using a Reactor, which, in turn requires thenio4r
gem.The user impact is that if you're using the status server,
nio4r
gem. I don't know what the implications are for this last one, but in general, it's probably not good to double-load any gem.There are a bunch of different creative solutions to this problem, but I think the easiest is probably to just disable
queue_requests
for thePuma::Server
that serves the status server. Disabling that setting probably doesn't introduce a DOS vector since you probably shouldn't have your puma status server exposed to the public anyway--only trusted clients should have access.Your checklist for this pull request
[changelog skip]
or[ci skip]
to the pull request title.[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.