Add opt-in HANG-DIAG logging to chat stream generator#5
Open
prakhar-prakash-juspay wants to merge 2 commits into
Open
Add opt-in HANG-DIAG logging to chat stream generator#5prakhar-prakash-juspay wants to merge 2 commits into
prakhar-prakash-juspay wants to merge 2 commits into
Conversation
Logs a single HANG-DIAG line per request at completion or cancellation to identify hung requests and their cause: ttft_engine=NEVER points to a queue/prefill/engine stall, while gen_tokens>0 with content_chunks=0 points to parser suppression. Off by default; enable with VLLM_KIMI_HANG_DEBUG=1. When disabled the only added work is one time.monotonic() call per request, so it is safe to ship to prod and flip on per-instance.
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 |
Starlette tears the streaming async generator down via aclose() -> GeneratorExit (not CancelledError) on client disconnect / upstream read-timeout. Catch both so the HANG-DIAG line records cancelled accurately for either teardown path. Co-authored-by: Claude <noreply@anthropic.com>
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.
Logs a single HANG-DIAG line per request at completion or cancellation to identify hung requests and their cause: ttft_engine=NEVER points to a queue/prefill/engine stall, while gen_tokens>0 with content_chunks=0 points to parser suppression.
Off by default; enable with VLLM_KIMI_HANG_DEBUG=1. When disabled the only added work is one time.monotonic() call per request, so it is safe to ship to prod and flip on per-instance.
Purpose
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.