{"record":{"id":"90385572c9765e50","repo":"risingwavelabs/risingwave","slug":"failed-to-start-the-cdc-connector-before-the-timeo","errorCode":null,"errorMessage":"failed to start the CDC connector before the timeout (default: 60s).\nHINT: You can increase the timeout by:\n- Alter the running source: ALTER SOURCE <source_name> CONNECTOR WITH (cdc.source.wait.streaming.start.timeout = '<larger_value>');\n- Set the session variable and recreate the source: SET cdc_source_wait_streaming_start_timeout = <larger_value>;","messagePattern":"failed to start the CDC connector before the timeout \\(default: 60s\\)\\.\nHINT: You can increase the timeout by:\n- Alter the running source: ALTER SOURCE <source_name> CONNECTOR WITH \\(cdc\\.source\\.wait\\.streaming\\.start\\.timeout = '<larger_value>'\\);\n- Set the session variable and recreate the source: SET cdc_source_wait_streaming_start_timeout = <larger_value>;","errorType":"exception","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/source/reader.rs","lineNumber":172,"sourceCode":"            })\n        });\n\n        // wait for the handshake message\n        if let Some(res) = rx.recv().await {\n            let resp: GetEventStreamResponse = res?;\n            let inited = match resp.control {\n                Some(info) => info.handshake_ok,\n                None => {\n                    tracing::error!(\n                        ?source_id,\n                        \"did not receive the CDC handshake message: {:?}\",\n                        resp\n                    );\n                    false\n                }\n            };\n            if !inited {\n                bail!(\n                    \"failed to start the CDC connector before the timeout (default: 60s).\\n\\\n                    HINT: You can increase the timeout by:\\n\\\n                    - Alter the running source: ALTER SOURCE <source_name> CONNECTOR WITH (cdc.source.wait.streaming.start.timeout = '<larger_value>');\\n\\\n                    - Set the session variable and recreate the source: SET cdc_source_wait_streaming_start_timeout = <larger_value>;\"\n                );\n            }\n        }\n        tracing::info!(?source_id, \"CDC connector started\");\n\n        let instance = match T::source_type() {\n            CdcSourceType::Mysql\n            | CdcSourceType::Postgres\n            | CdcSourceType::Mongodb\n            | CdcSourceType::SqlServer => Self {\n                source_id: split.split_id() as u64,\n                start_offset: split.start_offset().clone(),\n                server_addr: None,\n                conn_props,","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/source/reader.rs#L154-L190","documentation":"The CDC reader waits for the upstream connector (Debezium engine) to reach a streaming/running state within a configurable timeout (default 60s). If the connector is still not initialized when the deadline passes, the reader bails with this error and the HINT describing how to raise `cdc_source_wait_streaming_start_timeout`.","triggerScenarios":"Source creation or recovery where the underlying Debezium connector takes longer than the timeout to start: very large snapshot in progress, slow initial connection to the upstream DB, broker/registry latency, or the connector erroring and retrying repeatedly.","commonSituations":"Huge MySQL tables making snapshot take minutes; network latency or DNS slowness to the upstream database; upstream DB connection pool exhaustion; running through slow proxies or Kafka Connect in some deployments.","solutions":["Increase the timeout: `ALTER SOURCE <source_name> CONNECTOR WITH (cdc.source.wait.streaming.start.timeout = '300');` (per the HINT).","Or session-then-recreate: `SET cdc_source_wait_streaming_start_timeout = 300;` and recreate the source.","Check upstream connector logs (.risingwave/log, connector errors) for repeated failures — a real error loops forever, not just slowly.","Fix the root cause (network, credentials, upstream DB load) so the connector starts promptly."],"exampleFix":"// before\n-- source times out with default 60s\nCREATE SOURCE ... WITH (connector='mysql-cdc', ...);\n// after\nALTER SOURCE my_source CONNECTOR WITH (cdc.source.wait.streaming.start.timeout = '300');","handlingStrategy":"retry","validationCode":"-- Pre-check connectivity and snapshot size before creating the source:\nSELECT COUNT(*) FROM my_table; -- if huge, raise the timeout preemptively\n-- Test reachability from RW host: mysql -h <host> -P <port> -u <user> -p","typeGuard":null,"tryCatchPattern":"match create_cdc_source().await {\n    Err(e) if e.to_string().contains(\"failed to start the CDC connector before the timeout\") => {\n        // raise cdc_source_wait_streaming_start_timeout and retry\n    }\n    r => r,\n}","preventionTips":["Set cdc.source.wait.streaming.start.timeout above your expected snapshot time for large tables.","Monitor connector logs during creation to distinguish slow start from hard failure.","Ensure stable, low-latency networking to the upstream database."],"tags":["cdc","timeout","connector-startup","debezium"],"backgroundTag":"request-timeout","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}