risingwavelabs/risingwave · error · ConnectorError
failed to start the CDC connector before the timeout…
Error message
failed to start the CDC connector before the timeout (default: 60s). HINT: You can increase the timeout by: - Alter the running source: ALTER SOURCE <source_name> CONNECTOR WITH (cdc.source.wait.streaming.start.timeout = '<larger_value>'); - Set the session variable and recreate the source: SET cdc_source_wait_streaming_start_timeout = <larger_value>;
What it means
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`.
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.
Example fix
// before -- source times out with default 60s CREATE SOURCE ... WITH (connector='mysql-cdc', ...); // after ALTER SOURCE my_source CONNECTOR WITH (cdc.source.wait.streaming.start.timeout = '300');
Defensive patterns
Strategy: retry
Validate before calling
-- Pre-check connectivity and snapshot size before creating the source: SELECT COUNT(*) FROM my_table; -- if huge, raise the timeout preemptively -- Test reachability from RW host: mysql -h <host> -P <port> -u <user> -p
Try / catch
match create_cdc_source().await {
Err(e) if e.to_string().contains("failed to start the CDC connector before the timeout") => {
// raise cdc_source_wait_streaming_start_timeout and retry
}
r => r,
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
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
- Debezium Mongo needs a `_id` column in table
- source validation failed
- unsupported encoding for DEBEZIUM_MONGO format
- all request confluent registry all timeout
- all senders are dropped
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/90385572c9765e50.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/source/cdc/source/reader.rs:172
})
});
// wait for the handshake message
if let Some(res) = rx.recv().await {
let resp: GetEventStreamResponse = res?;
let inited = match resp.control {
Some(info) => info.handshake_ok,
None => {
tracing::error!(
?source_id,
"did not receive the CDC handshake message: {:?}",
resp
);
false
}
};
if !inited {
bail!(
"failed to start the CDC connector before the timeout (default: 60s).\n\
HINT: 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>;"
);
}
}
tracing::info!(?source_id, "CDC connector started");
let instance = match T::source_type() {
CdcSourceType::Mysql
| CdcSourceType::Postgres
| CdcSourceType::Mongodb
| CdcSourceType::SqlServer => Self {
source_id: split.split_id() as u64,
start_offset: split.start_offset().clone(),
server_addr: None,
conn_props,View on GitHub (pinned to 6469eb736d)