<@U04S8PLJWMT> using Airbyte cloud getting this me...
# ask-ai
f
@kapa.ai using Airbyte cloud getting this message when syncing data from sql server to snowflake: Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency.
k
The error message "Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency." occurs when Airbyte's SQL Server source connector is using Change Data Capture (CDC) and the saved offset (commit_lsn) is no longer available in the SQL Server's CDC log. This typically happens if: - The CDC retention period is too short, so the log entries needed for incremental syncs are purged before Airbyte can read them. - The sync frequency is too low, so Airbyte misses the window to read the required CDC entries. How to resolve: 1. Reset the Connection: Resetting the connection will allow Airbyte to perform a full refresh and re-establish a valid offset. 2. Increase Binlog (CDC) Retention: Adjust your SQL Server's CDC retention period to be longer, ensuring that log entries remain available until Airbyte can process them. This is especially important if your syncs are infrequent or if there are periods of low/no data changes. 3. Increase Sync Frequency: Run Airbyte syncs more frequently so that the connector reads the CDC logs before they are purged by SQL Server. This issue is known to occur if no rows are transported for a period longer than the CDC retention window, causing the commit_lsn to become out of range. As a result, the next sync fails with this error. The recommended approach is to ensure that either the retention period is sufficiently long or the syncs are frequent enough to avoid this gap. If you do not expect regular data changes, you may still need to sync more often or extend the retention period to prevent this error from recurring. For more technical details, see the related discussion and code references in the Airbyte issue tracker: [source-mssql sync fails with CDC and no changes](https://github.com/airbytehq/airbyte/issues/37772). If you continue to experience issues after making these adjustments, consider sharing your logs and configuration details with the Airbyte team for further assistance.
f
@kapa.ai the CDC retention is set to 72 hours and the sync frequency is 6 hours. This error should not have occurred. Why is this occurring?
k
A message from kapa.ai
Based on the knowledge sources, even when the CDC retention is set to 72 hours and the sync frequency is every 6 hours, this error can still occur due to several possible reasons: 1. No Data Changes (No LSN Advancement): If there are no changes in the tracked tables during the retention window, the commit_lsn (the offset Airbyte uses) may not advance. SQL Server’s CDC cleanup job can remove older entries, and if Airbyte’s last saved offset points to an LSN that has been purged (because no new data was written and thus no new LSN was committed), the next sync will fail with this error. This scenario is described in detail in [this issue](https://github.com/airbytehq/airbyte/issues/37772): > When no rows are transported the "commit_lsn" won’t be updated. This leads to the "commit_lsn" being out of range after the third day. 2. CDC Cleanup Job and LSN Mapping: Even if the retention period and sync frequency seem sufficient, the way SQL Server manages LSNs and the CDC cleanup job can result in the required LSN being purged if there is no data movement. The Airbyte connector relies on the presence of the commit_lsn in the CDC tables, and if it’s missing, the error is triggered. 3. Other Environmental or Configuration Issues: There could be other factors such as clock drift, misconfigured jobs, or issues with how Airbyte tracks state, but the most common cause (as seen in the linked issue) is the absence of data changes leading to the offset being purged. Summary: Even with a 72-hour retention and 6-hour syncs, if there are periods with no data changes, the commit_lsn may not advance and can be purged by the CDC cleanup job, causing this error. To mitigate, ensure there is at least some data movement within the retention window, or consider increasing the retention period further if long periods of inactivity are expected. [See discussion and technical details](https://github.com/airbytehq/airbyte/issues/37772).