nautechsystems/nautilus_trader · error · anyhow::Error
readiness timeout while waiting for engine connections
Error message
readiness timeout while waiting for engine connections
What it means
During LiveNode.start(), after data and execution clients connect, the node waits on await_engines_connected for all internal engines to report connected within the timeout_connection deadline. If the deadline elapses first, startup is aborted with this error. It means the node's internal engine bus never reached a fully-connected state, usually because a client connect stalled or the configured connection timeout is too short for the environment.
Source
Thrown at crates/live/src/node/mod.rs:466
if let Err(e) = self.connect_exec_clients(connection_deadline).await {
return self
.abort_startup_with_error("Execution client connection timed out", e)
.await;
}
if let Some(reason) = self.startup_abort_reason() {
self.abort_startup(reason).await?;
return Ok(());
}
match self.await_engines_connected(connection_deadline).await {
EngineConnectionStatus::Connected => {}
EngineConnectionStatus::TimedOut => {
return self
.abort_startup_with_error(
"Engine readiness timed out",
anyhow::anyhow!("readiness timeout while waiting for engine connections"),
)
.await;
}
EngineConnectionStatus::StopRequested => {
self.abort_startup("Stop signal received during startup")
.await?;
return Ok(());
}
EngineConnectionStatus::ShutdownRequested => {
self.abort_startup("Shutdown signal received during startup")
.await?;
return Ok(());
}
}
if let Err(e) = self.perform_startup_reconciliation().await {
if let Err(finalize_err) = self.abort_startup("Startup reconciliation failed").await {
anyhow::bail!(View on GitHub (pinned to 18893faf8b)
Solutions
- Increase timeout_connection in the live node config (e.g. timeout_connection: 60s or higher) and retry startup.
- Verify network reachability of the data/execution venue endpoints (ping, TLS handshake) from the host running the node.
- Check adapter logs for a stalled or failing connect() on a specific client and fix credentials/endpoints for that adapter.
- If a zero timeout_connection is configured (do-not-wait mode), confirm the environment actually allows ready callbacks to fire promptly; otherwise set a positive timeout.
Example fix
// before
LiveNodeConfig {
timeout_connection: Duration::from_secs(5),
..Default::default()
}
// after
LiveNodeConfig {
timeout_connection: Duration::from_secs(60),
..Default::default()
} Defensive patterns
Strategy: retry
Validate before calling
// Rust: check config before building the node
assert!(config.timeout_connection > Duration::from_secs(10), "timeout_connection too small for live trading");
// verify endpoints reachable
for host in [&data_host, &exec_host] {
TcpStream::connect((host.as_str(), port))?.set_read_timeout(Some(Duration::from_secs(5)))?;
} Try / catch
match node.start().await {
Ok(()) => {},
Err(e) if e.to_string().contains("readiness timeout") => {
// back off, check venue reachability, then retry with a larger timeout_connection
}
Err(e) => return Err(e),
} Prevention
- Set timeout_connection generously (60s+) for production venues
- Health-check venue endpoints before node startup
- Monitor adapter connect logs for slow handshakes
- Avoid zero timeout_connection unless intentionally running in do-not-wait mode
When it happens
Trigger: LiveNode::start() reaches await_engines_connected(connection_deadline) and receives EngineConnectionStatus::TimedOut because one or more engines did not signal connection before config.timeout_connection elapsed (crates/live/src/node/mod.rs:460-468).
Common situations: Slow or unreachable broker/exchange endpoints; network latency exceeding the default timeout_connection; an adapter whose connect() hangs without surfacing an error; running behind a VPN or proxy that delays handshake; data client connected but exec client stalled so engines never all report connected.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- data-connect timeout
- exec-connect timeout
- Timeout waiting for account {account_id} to be registered af
- subscription confirmation failed: {e}
- Hyperliquid WebSocket handler did not stop after abort
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/c4dff200bdd72d33.
Report an issue: GitHub.