{"record":{"id":"c4dff200bdd72d33","repo":"nautechsystems/nautilus_trader","slug":"readiness-timeout-while-waiting-for-engine-connect","errorCode":null,"errorMessage":"readiness timeout while waiting for engine connections","messagePattern":"readiness timeout while waiting for engine connections","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/live/src/node/mod.rs","lineNumber":466,"sourceCode":"\n        if let Err(e) = self.connect_exec_clients(connection_deadline).await {\n            return self\n                .abort_startup_with_error(\"Execution client connection timed out\", e)\n                .await;\n        }\n\n        if let Some(reason) = self.startup_abort_reason() {\n            self.abort_startup(reason).await?;\n            return Ok(());\n        }\n\n        match self.await_engines_connected(connection_deadline).await {\n            EngineConnectionStatus::Connected => {}\n            EngineConnectionStatus::TimedOut => {\n                return self\n                    .abort_startup_with_error(\n                        \"Engine readiness timed out\",\n                        anyhow::anyhow!(\"readiness timeout while waiting for engine connections\"),\n                    )\n                    .await;\n            }\n            EngineConnectionStatus::StopRequested => {\n                self.abort_startup(\"Stop signal received during startup\")\n                    .await?;\n                return Ok(());\n            }\n            EngineConnectionStatus::ShutdownRequested => {\n                self.abort_startup(\"Shutdown signal received during startup\")\n                    .await?;\n                return Ok(());\n            }\n        }\n\n        if let Err(e) = self.perform_startup_reconciliation().await {\n            if let Err(finalize_err) = self.abort_startup(\"Startup reconciliation failed\").await {\n                anyhow::bail!(","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/live/src/node/mod.rs#L448-L484","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before\nLiveNodeConfig {\n    timeout_connection: Duration::from_secs(5),\n    ..Default::default()\n}\n// after\nLiveNodeConfig {\n    timeout_connection: Duration::from_secs(60),\n    ..Default::default()\n}","handlingStrategy":"retry","validationCode":"// Rust: check config before building the node\nassert!(config.timeout_connection > Duration::from_secs(10), \"timeout_connection too small for live trading\");\n// verify endpoints reachable\nfor host in [&data_host, &exec_host] {\n    TcpStream::connect((host.as_str(), port))?.set_read_timeout(Some(Duration::from_secs(5)))?;\n}","typeGuard":null,"tryCatchPattern":"match node.start().await {\n    Ok(()) => {},\n    Err(e) if e.to_string().contains(\"readiness timeout\") => {\n        // back off, check venue reachability, then retry with a larger timeout_connection\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["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"],"tags":["network","timeout","startup","async"],"backgroundTag":"request-timeout","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}