{"record":{"id":"86bbd829585a96d8","repo":"vllm-project/vllm","slug":"request-output-stream-for-request-id-closed-un","errorCode":null,"errorMessage":"request output stream for `{request_id}` closed unexpectedly","messagePattern":"request output stream for `(.+?)` closed unexpectedly","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"rust/src/engine-core-client/src/error.rs","lineNumber":82,"sourceCode":"        context: &'static str,\n        field: &'static str,\n    },\n    #[error(\"engine control channel closed unexpectedly: {message}\")]\n    ControlClosed { message: String },\n    #[error(\"request `{request_id}` is already in flight\")]\n    DuplicateRequestId { request_id: String },\n    #[error(\n        \"data parallel rank {rank} is not connected to this frontend; connected ranks: {connected_ranks:?}\"\n    )]\n    InvalidDataParallelRank {\n        rank: u32,\n        connected_ranks: Vec<u32>,\n    },\n    #[error(\"engine-core output dispatcher closed: {message}\")]\n    DispatcherClosed { message: String },\n    #[error(\"engine-core client is closed: {message}\")]\n    ClientClosed { message: String },\n    #[error(\"request output stream for `{request_id}` closed unexpectedly\")]\n    RequestStreamClosed { request_id: String },\n    #[error(\"utility call `{method}` failed (call_id={call_id}): {message}\")]\n    UtilityCallFailed {\n        method: String,\n        call_id: UtilityCallId,\n        message: String,\n    },\n    #[error(\"utility call `{method}` returned an invalid result (call_id={call_id}): {message}\")]\n    UtilityResultDecode {\n        method: String,\n        call_id: UtilityCallId,\n        message: String,\n    },\n    #[error(\"utility call `{method}` closed unexpectedly (call_id={call_id})\")]\n    UtilityCallClosed { method: String, call_id: u64 },\n    #[error(\"utility call `{method}` returned inconsistent results across engines: {values}\")]\n    InconsistentUtilityResults { method: String, values: String },\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/engine-core-client/src/error.rs#L64-L100","documentation":"EngineCoreError::RequestStreamClosed indicates the per-request output stream for `request_id` ended before the request reached a terminal state (finish/final output). This happens when the engine-core side drops that request's output channel without sending the completion event.","triggerScenarios":"Streaming a generate() result and the engine-core aborts, evicts, or loses the request (e.g. engine crash, forced flush, scheduler drop) so the stream ends without a FinishReason-bearing final message.","commonSituations":"Engine-core restart or crash mid-generation; request aborted by server-side policy while the consumer still polls the stream; bugs where the final output frame is not enqueued.","solutions":["Check engine-core logs for what happened to this request_id (abort, preemption failure, crash)","Retry the request with the same inputs using a NEW request_id (the old ID may still be registered as in-flight)","If it reproduces deterministically, capture the request and report it as an engine-core streaming bug"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"pub fn is_request_stream_closed(e: &vllm_engine_core_client::Error) -> bool {\n    matches!(e, vllm_engine_core_client::Error::RequestStreamClosed { .. })\n}","tryCatchPattern":"if matches!(err, vllm_engine_core_client::Error::RequestStreamClosed { .. }) && attempt < MAX {\n    let rid = uuid::Uuid::new_v4().to_string(); // new id: old one may still be registered\n    return retry_generate(rid, req, attempt + 1).await;\n}","preventionTips":["Retry with a fresh request_id since the original may remain marked in-flight","Set client-side timeouts on streams so silent closures are detected promptly","Track finish reasons; treat stream end without a terminal event as an error, not EOF"],"tags":["streaming","request-lifecycle","engine-core","rust"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}