astrid-runtime/astrid · error
MCP gateway PID is still starting within seconds
Error message
MCP gateway PID {} is still starting within {} seconds What it means
Fired by wait_for_gateway when a leased supervisor PID is alive but the gateway has not published readiness before the deadline. The startup is in progress but is not converging within the allowed window.
Solutions
- Check gateway startup logs for errors or slow initialization
- Kill the still-starting process and retry
- Free system resources if the startup is blocked on them
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/astrid-cli/src/commands/mcp/lifecycle.rs:465 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/71ceff21d4b42533.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-cli/src/commands/mcp/lifecycle.rs:465
let Some(supervisor) = supervisor else {
if Instant::now() >= deadline {
anyhow::bail!(
"MCP gateway startup supervisor remained active within {} seconds",
SPAWNED_READY_TIMEOUT.as_secs()
);
}
tokio::time::sleep(READY_POLL).await;
continue;
};
if read_gateway_ready()?.is_some() {
continue;
}
if let Some(lease) = read_gateway_startup_lease()?
&& crate::commands::daemon_control::is_process_alive(lease.supervisor_pid)
{
drop(supervisor);
if Instant::now() >= deadline {
anyhow::bail!(
"MCP gateway PID {} is still starting within {} seconds",
lease.supervisor_pid,
SPAWNED_READY_TIMEOUT.as_secs()
);
}
tokio::time::sleep(READY_POLL).await;
continue;
}
let Some(lifecycle) = try_acquire_gateway_lifecycle()? else {
drop(supervisor);
if Instant::now() >= deadline {
anyhow::bail!(
"MCP gateway is starting but has not published readiness within {} seconds",
SPAWNED_READY_TIMEOUT.as_secs()
);
}
tokio::time::sleep(READY_POLL).await;
continue;View on GitHub (pinned to affd8760f4)