{"record":{"id":"1a9e168fec88b18c","repo":"vllm-project/vllm","slug":"engine-count-must-be-at-least-1","errorCode":null,"errorMessage":"engine count must be at least 1","messagePattern":"engine count must be at least 1","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rust/src/server/src/config.rs","lineNumber":266,"sourceCode":"                self.data_parallel_size\n            );\n        }\n        match &self.transport_mode {\n            TransportMode::HandshakeOwner { engine_count, .. } => {\n                if *engine_count != self.data_parallel_size {\n                    bail!(\n                        \"managed frontend engine count ({engine_count}) must equal data parallel size ({})\",\n                        self.data_parallel_size\n                    );\n                }\n            }\n            TransportMode::Bootstrapped {\n                engine_start_index,\n                engine_count,\n                ..\n            } => {\n                if *engine_count == 0 {\n                    bail!(\"engine count must be at least 1\");\n                }\n                let engine_start_index = usize::try_from(*engine_start_index)\n                    .map_err(|_| anyhow::anyhow!(\"engine start index does not fit usize\"))?;\n                let engine_end_index =\n                    engine_start_index.checked_add(*engine_count).ok_or_else(|| {\n                        anyhow::anyhow!(\"engine start index + engine count overflows\")\n                    })?;\n                if engine_end_index > self.data_parallel_size {\n                    bail!(\n                        \"connected engine range [{engine_start_index}, {engine_end_index}) exceeds data parallel size {}\",\n                        self.data_parallel_size\n                    );\n                }\n            }\n        }\n\n        Ok(())\n    }","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/rust/src/server/src/config.rs#L248-L284","documentation":"Thrown by Config::validate() when the transport mode is TransportMode::Bootstrapped (this frontend serves a slice of engines started elsewhere) and the configured engine_count is 0. A bootstrapped frontend must front at least one engine.","triggerScenarios":"Launching a bootstrapped frontend instance whose engine-count assignment (e.g. from a scheduler dividing engines across frontends) computed to 0. The check runs before the start-index range checks.","commonSituations":"A supervisor distributing N engines over M frontends with rounding that yields 0 for some instance; a config template defaulting engine count to 0; misordered bootstrap arguments shifting values.","solutions":["Ensure this frontend instance is assigned at least one engine (engine_count >= 1).","Fix the distribution logic: use ceil-division or skip spawning frontends that would get zero engines.","Verify the bootstrap arguments order and values in your launcher."],"exampleFix":"# before\nengine_count = 0\n\n# after\nengine_count = 1","handlingStrategy":"validation","validationCode":"if let TransportMode::Bootstrapped { engine_count, .. } = &config.transport_mode {\n    assert!(*engine_count >= 1, \"bootstrapped engine count must be >= 1\");\n}","typeGuard":"fn bootstrapped_count_is_valid(config: &Config) -> bool {\n    match &config.transport_mode {\n        TransportMode::Bootstrapped { engine_count, .. } => *engine_count >= 1,\n        _ => true,\n    }\n}","tryCatchPattern":null,"preventionTips":["Use ceil-division when splitting engines across frontends; skip zero-count frontends.","Default engine counts to 1, never 0, in templates.","Validate assignments centrally before distributing them."],"tags":["configuration","transport","bootstrap","data-parallel","rust","vllm","startup"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}