Repository navigation
Keep HTTP responsive with idle chat clients - #9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
Eight idle TCP chat clients occupy all workers in the shared pool, leaving HTTP requests queued. A bounded local ThreadPool reproduction confirmed that an additional task could not start while all eight workers waited.
Change
/over HTTP.Checks
sh tests/run.shon macOS, C++17 with-Wall -Wextra -Werror.git diff origin/main...HEAD --check.linuxon push and PR: C++ regression tests,make -C src, and the eight-idle-client HTTP smoke test (Actions run 40459428303).Remaining risk
The change increases the idle worker count from 8 to 16. TCP still supports at most eight concurrently blocking client handlers; HTTP requests can still queue behind other HTTP clients. Please review the Linux CI result and run a live multi-client check before merging.