{"record":{"id":"358aa28811b1fc8b","repo":"windmill-labs/windmill","slug":"installation-stopped-reason","errorCode":null,"errorMessage":"Installation stopped. Reason: {:?}","messagePattern":"Installation stopped\\. Reason: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"backend/windmill-worker/src/universal_pkg_installer.rs","lineNumber":710,"sourceCode":"            dep,\n            installer_executable_name.to_owned(),\n            job_id.clone(),\n            w_id.to_owned(),\n            worker_name.to_owned(),\n            conn.to_owned(),\n            counter_arc.clone(),\n            total_to_install,\n            name_ml,\n            action,\n            _language_name.to_owned(),\n            _platform_agnostic,\n            permit,\n            TaskKiller(kill_tx),\n            post_install_c,\n        );\n        handles.push(tokio::spawn(async move {\n            tokio::select! {\n                reason = kill_rx.recv() => return Err(anyhow::anyhow!(\"Installation stopped. Reason: {:?}\", reason)),\n                r = task_fut => return r\n            };\n        }));\n    }\n\n    Ok((handles, closer))\n}\n/// Do not drop the returned sender! As soon as you drop it the polling thread will stop\npub async fn listen_to_cancel(\n    job_id: Uuid,\n    w_id: String,\n    conn: Connection,\n    killpill: tokio::sync::broadcast::Sender<String>,\n) -> tokio::sync::broadcast::Sender<()> {\n    let (close_tx, mut close_rx) = tokio::sync::broadcast::channel::<()>(1);\n    tokio::spawn(async move {\n        'outer: loop {\n            tokio::select! {","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-worker/src/universal_pkg_installer.rs#L692-L728","documentation":"When installing language dependencies (pip/npm/etc.), Windmill spawns each installation task inside a `tokio::select!` that races the actual install future against a kill-channel receiver. If a `TaskKiller` signal (timeout, job cancellation, worker shutdown) arrives on `kill_rx` before the install finishes, the spawned task returns this error reporting the kill reason. It is the normal outcome of an aborted dependency install, not a bug in the package manager itself.","triggerScenarios":"A job that triggered `par_install_language_dependencies_all_at_once` or `par_install_language_dependencies_seq` is cancelled, times out, or the worker is shutting down while dependency installation (e.g. `pip install`, `bun install`) is still in flight; the kill signal races ahead of the install future.","commonSituations":"Long pip installs exceeding the job timeout, users cancelling a running flow/script, worker restarts or dedicates being killed mid-install, kill switch triggered by the worker supervisor.","solutions":["Check the `{:?}` reason in the message: if it is a timeout, increase the job timeout or reduce dependency set size","If the job was cancelled intentionally, no action needed — re-run the job","Pin/pre-warm dependencies (lockfiles, cached lock requires) so installs finish faster and are less likely to be killed","Verify worker stability/network to registry — slow downloads make timeouts likelier"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n  Err(e) if e.to_string().contains(\"Installation stopped\") => {\n    // inspect the Reason in the message; treat as cancellation, optionally re-run\n  }\n  r => r?,\n}","preventionTips":["Set job timeouts generously for heavy dependency installs","Use lockfiles/cached requires to shorten install time","Avoid cancelling jobs mid-install unless necessary","Ensure worker stability during long installs"],"tags":["dependencies","cancellation","tokio","worker"],"backgroundTag":"task-cancelled","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}