windmill-labs/windmill · error
isolate failed during pre-warm
Error message
isolate failed during pre-warm
What it means
PrewarmedIsolate::wait_ready awaits a oneshot channel that the isolate signals once module pre-loading finishes. If the sender is dropped before signaling success — the isolate failed during pre-warm — this error is thrown.
Source
Thrown at backend/windmill-runtime-nativets/src/dedicated.rs:140
let logs = log_handle.await.unwrap_or_default();
let _ = result_tx.send(PrewarmedResult { result, logs });
Ok(())
})
});
PrewarmedIsolate {
args_tx: Some(args_tx),
result_rx: Some(result_rx),
ready_rx: Some(ready_rx),
handle: Some(handle),
}
}
/// Wait for the isolate to finish loading modules.
pub async fn wait_ready(&mut self) -> anyhow::Result<()> {
if let Some(rx) = self.ready_rx.take() {
rx.await
.map_err(|_| anyhow::anyhow!("isolate failed during pre-warm"))?;
}
Ok(())
}
/// Send args and start execution. Returns an `ExecutingIsolate` that
/// can be awaited independently, allowing the caller to pre-warm
/// the next isolate in parallel.
pub fn start_execution(mut self, args: String) -> ExecutingIsolate {
let args_tx = self.args_tx.take().expect("start_execution called twice");
let _ = args_tx.send(args);
ExecutingIsolate {
result_rx: self.result_rx.take().expect("result_rx missing"),
handle: self.handle.take().expect("handle missing"),
}
}
}
View on GitHub (pinned to e474e8803c)
Solutions
- Check logs for the underlying module-load failure reported by the isolate before the channel closed
- Verify network access from the worker to remote module registries (npm, https imports)
- Retry the execution to rule out a transient warm-up failure
- Pin/verify imported module versions so warm-up is deterministic
- Upgrade the runtime if module-load failures panic instead of reporting a clean error
Defensive patterns
Strategy: fallback
Validate before calling
// validate warm-up deterministically before relying on pre-warm
async fn prewarm_safe(make: impl Fn() -> PrewarmedIsolate) -> anyhow::Result<PrewarmedIsolate> {
let mut iso = make();
if let Err(e) = iso.wait_ready().await {
tracing::warn!("pre-warm failed ({e}); falling back to cold start");
return Err(e);
}
Ok(iso)
} Try / catch
if let Err(e) = isolate.wait_ready().await {
// fall back to a cold (non-prewarmed) execution path
return run_cold(args).await;
} Prevention
- Pin all imported module versions (npm/URL imports) so warm-up is deterministic
- Ensure the worker has network access to module registries before enabling pre-warm
- Fall back to cold execution when wait_ready fails instead of failing the job
- Test that imports resolve in the exact worker image you deploy
When it happens
Trigger: Calling wait_ready() on a PrewarmedIsolate whose ready_tx was dropped without Ok: module load failed inside the isolate and the isolate task exited, or the isolate thread died during warm-up.
Common situations: Scripts importing modules that fail to resolve/compile at warm-up time; network failures fetching remote npm/URL imports during pre-warm; isolate killed during initialization.
Related errors
- isolate result channel closed
- isolate thread panicked: {e}
- preprocessor function is missing
- ${main_name} function is missing
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/0e5d6c53a76a9e7d.
Report an issue: GitHub.