Iulian
12/30/2025, 2:13 PMkapa.ai
12/30/2025, 2:13 PMValue: TIMEOUT is the close reason. From the platform side, Airbyte monitors “heartbeats” (records or state messages) from the source; if no message is seen for longer than the configured threshold (heartbeat-max-seconds-between-messages in flags.yaml), the sync is failed with an internal heartbeat timeout and the source is considered unresponsive.[\[Heartbeats](https://docs.airbyte.com/platform/understanding-airbyte/heartbeats#technical-details)] In your case, the Debezium-based MongoDB v2 connector is reporting that it is closing due to a timeout condition, which is consistent with that heartbeat/timeout mechanism. The knowledge sources do not provide a more detailed, connector‑specific definition of the db-sources-debezium-close-reason values, so beyond this general timeout/heartbeat explanation, there’s no further official detail available.Iulian
12/30/2025, 2:17 PMkapa.ai
12/30/2025, 2:17 PMkapa.ai
12/30/2025, 2:17 PMtext CDC events queue poll(): blocked for PT5M0.000726221S in its first call. CDC events queue poll(): returned nothing. No records were returned by Debezium in the timeout seconds 300, closing the engine and iterator This is the DebeziumRecordIterator saying: - It waited 300 seconds (5 minutes) for Debezium to put any CDC events into its internal queue. - Nothing arrived (no change events, no heartbeats). - Because of that, it closed the Debezium engine with a timeout close reason, which is what you see as db-sources-debezium-close-reason | Value: TIMEOUT in the other log. [[Saved offset issue](https://github.com/airbytehq/airbyte/issues/70222)] The knowledge sources don’t provide additional MongoDB‑specific causes beyond this generic behavior: if Debezium doesn’t emit any records within the configured timeout window, Airbyte treats it as a timeout and stops the sync.Iulian
12/30/2025, 2:21 PMkapa.ai
12/30/2025, 2:21 PMkapa.ai
12/30/2025, 2:21 PMreplicaSet parameter bug) and some generic Debezium timeout/close behavior, not the detailed “Unable to fetch change stream events” failure you’re seeing now.[[MongoDB v2 issue](https://github.com/airbytehq/airbyte/issues/63300); [MongoDB v2 changelog](https://docs.airbyte.com/integrations/sources/mongodb-v2#changelog)] From what is documented: - MongoDB v2 uses Debezium for CDC; when Debezium encounters an internal error in the change-event producer, Airbyte wraps it as a FailedRecordIteratorException and shuts down the iterator. That’s the pattern you see in your stack trace (Debezium error → `DebeziumRecordPublisher`/`DebeziumRecordIterator` → FailedRecordIteratorException).[[MongoDB v2 issue](https://github.com/airbytehq/airbyte/issues/63300)] - Separately, there is a known open bug where the MongoDB v2 connector can mis-handle replica set configuration for self‑managed replica sets, causing Debezium to fail to connect properly for CDC. In that case, Debezium logs connection/validation errors and the sync fails during incremental CDC.[[MongoDB v2 issue](https://github.com/airbytehq/airbyte/issues/63300)] However: - Your logs show Unable to fetch change stream events and Error while attempting to Reading change stream, which look like a lower‑level MongoDB change stream problem (network, permissions, topology, or server‑side issue), but the provided docs don’t describe this scenario or its root causes. - The docs also don’t describe any change in 2.0.4 that would directly explain a new, persistent “Unable to fetch change stream events” error after a long initial sync; 2.0.4 is documented as adding state format validation only.[[MongoDB v2 changelog](https://docs.airbyte.com/integrations/sources/mongodb-v2#changelog)] Given these limits, I can’t reliably say: - Why your 4‑hour run worked and then stopped. - Why every subsequent run now immediately hits this Debezium/MongoDB change stream error. - Whether this is due to connector configuration, MongoDB server state, or an environmental change. To move forward, you’ll likely need to: 1. Inspect MongoDB server logs around the time of the failure for change stream / cursor / auth / network errors. 2. Double‑check your MongoDB v2 source configuration (especially replica set / connection string) against the known replica set bug described in the GitHub issue.[[MongoDB v2 issue](https://github.com/airbytehq/airbyte/issues/63300)] 3. If possible, open or update a GitHub issue with these exact logs so the Airbyte team can correlate them with existing MongoDB v2 CDC issues. I’m constrained to what’s in the knowledge sources, so I can’t go beyond this without guessing.Iulian
12/30/2025, 2:23 PMkapa.ai
12/30/2025, 2:23 PMkapa.ai
12/30/2025, 2:23 PM51091, so I can’t give a connector‑specific root cause with certainty. I can, however, relate it to how the MongoDB v2 source works. Your stack trace shows: > MongoCommandException: ... "Regular expression is invalid: pattern string is longer than the limit set by the application" ... code 51091 This is coming directly from MongoDB when the connector runs a command that includes a $regex filter whose pattern string is too long for MongoDB’s internal limit. The error then bubbles up through Debezium (Unable to fetch change stream events) and causes the CDC engine to stop, which is why you see the Debezium timeout/close behavior and the sync failure. In the available docs/issues: - There are known MongoDB v2 problems around CDC and Debezium (e.g., replica set handling, oplog/offset issues), but none mention regex length or error 51091.[[MongoDB v2 issue](https://github.com/airbytehq/airbyte/issues/63300); [Saved offset issue](https://github.com/airbytehq/airbyte/issues/70222)] - The troubleshooting guide talks about oplog/change stream limitations and general CDC failures, but not regex‑related errors.[[MongoDB v2 troubleshooting](https://docs.airbyte.com/integrations/sources/mongodb-v2/mongodb-v2-troubleshooting#connector-limitations)] Because this regex error is not documented for the connector, I can’t say from the knowledge sources: - Which exact query the connector is issuing that contains this regex. - Whether this is a bug in the connector’s query construction, or triggered by specific data/field names in your collections. Given the constraints of the docs, the most I can reliably say is: - The immediate cause of your failure is MongoDB rejecting a command due to an over‑long regular expression pattern (code 51091). - That error propagates through Debezium and causes the MongoDB v2 CDC sync to stop. - There is no existing Airbyte documentation or GitHub issue in the provided sources that describes this particular regex‑length problem for source-mongodb-v2. To get this resolved, you’ll likely need to: 1. Enable more verbose logging on the MongoDB side to see which command (and which collection/field) is using that regex. 2. Open or update a GitHub issue for source-mongodb-v2 with this full stack trace and error payload, since it appears to be a new/undocumented failure mode relative to the current MongoDB v2 docs and issues.