<@U04S8PLJWMT> I keep getting this error even thou...
# ask-ai
n
@kapa.ai I keep getting this error even though I have disabled cdc on all tables, increase retention period and try to sync another table. I use SQL Server as my source: Failure in source: 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.” typically occurs when the Change Data Capture (CDC) log entries required for incremental sync are no longer available on the SQL Server. This can happen if the retention period for CDC data is too short or if syncs are not frequent enough, causing the required log entries to be cleaned up before Airbyte can read them. From the knowledge sources, even if you have disabled CDC on all tables and increased the retention period, the error can still occur if the saved offset (commit_lsn) that Airbyte is trying to resume from is no longer present in the server’s CDC tables. This is especially likely if there was a period of inactivity (no rows synced) longer than the retention period, or if the offset Airbyte is tracking is from a previously enabled table or sync configuration. The error is not directly related to binlogs (as in MySQL), but to the CDC log retention in SQL Server. Key points from the knowledge sources: - The error is triggered when the commit_lsn Airbyte is tracking is outside the current range of available CDC logs on the server. - This can happen if no data changes are captured for a period longer than the CDC retention, or if the offset is stale from a previous configuration. - Even after disabling CDC on all tables, Airbyte may still attempt to resume from an old offset unless the connection is reset. - The recommended solution is to reset the Airbyte connection, which will clear the saved offset and allow Airbyte to start from the current state of the server. After resetting, ensure that the CDC retention period is sufficiently long and that syncs are frequent enough to avoid this issue in the future. Reference: This scenario and solution are described in detail in a similar issue for the MSSQL source connector, where the error occurs after the retention period expires and no data has been synced, causing the commit_lsn to be out of range. The solution is to reset the connection and increase the retention period or sync frequency as needed [source-mssql sync fails with CDC and no changes](https://github.com/airbytehq/airbyte/issues/37772). Summary of steps to resolve: 1. Reset the Airbyte connection for your SQL Server source. 2. Ensure the CDC retention period is set to a value longer than the maximum expected interval between syncs. 3. Run syncs more frequently if possible to avoid the offset being purged. If you continue to see this error after following these steps, double-check that all previous CDC configurations and offsets have been cleared, and that the Airbyte connection is fully reset.
n
@kapa.ai how to reset the connection?
k
A message from kapa.ai
To reset a connection in Airbyte, you need to perform a "Clear" operation, which replaces the previous "Reset" functionality. Here’s how you can do it from the Airbyte UI: 1. Navigate to the connection's Settings tab. 2. Click "Clear data". 3. Confirm the selection to remove all previously synced data from the destination for that connection. This will clear the saved offsets and allow Airbyte to start syncing from the current state of your source. After clearing, you should initiate a new sync to backfill all historical data. Please note that clearing is irreversible and will delete all records in your destination tables for that connection, but the tables themselves will not be removed—they will just be emptied. If you only want to clear a single stream, you can do so from the connection's status page by clicking the three dots next to the stream and selecting "Clear data" [Clearing your data](https://docs.airbyte.com/platform/operator-guides/clear). If you encounter a failed clear, you may need to manually drop the tables in your destination so Airbyte can continue syncing accurately. Important: - Not all sources retain their history forever. If you clear and your source does not retain all records, this may lead to data loss. - Clearing your data blocks regular syncs until the clear is complete. For more details, see the official documentation: [Clearing your data](https://docs.airbyte.com/platform/operator-guides/clear).
n
@kapa.ai after clearing data I just need to re-sync the stream right?
k
A message from kapa.ai
Yes, after clearing data in Airbyte, you need to run a sync to reload the data for that stream or connection. Clearing removes all previously synced data from your destination, and a subsequent sync will backfill all historical data from your source, as long as the source retains it. This process is described in the documentation: > In order to backfill all historical data, a sync should be initiated after your clear succeeds. > ...You will then need to sync the connection again in order to reload data for that stream. [Clearing your data](https://docs.airbyte.com/platform/operator-guides/clear) So, after clearing, simply trigger a sync to repopulate your destination.
n
@kapa.ai what if I still get error after clearing and re-sync data?
k
A message from kapa.ai
If you still get the "Saved offset no longer present on the server" error after clearing data and re-syncing, it indicates that Airbyte is still unable to find a valid starting point in the CDC logs of your SQL Server source. This can happen if: - The CDC retention period is still too short compared to your sync frequency, causing required log entries to be purged before Airbyte can read them. - There is a misconfiguration or issue with how offsets are managed, especially if CDC was recently disabled or re-enabled on tables. - The offset Airbyte is trying to use is not present in the server, possibly due to a stale or corrupted state. What you can do: - Double-check that the CDC retention period is set long enough to cover the maximum interval between syncs. The documentation recommends increasing the retention period if you are not syncing very frequently. For example, you can set it to 10 days using the
sp_cdc_change_job
stored procedure as shown in the [MSSQL CDC setup guide](https://docs.airbyte.com/integrations/sources/mssql#4-extend-the-retention-period-of-cdc-data). - Make sure you have fully reset (cleared) the connection in Airbyte, as described in the [clear data documentation](https://docs.airbyte.com/platform/operator-guides/clear). - If the problem persists even after clearing and re-syncing, the knowledge sources suggest that this may be due to a persistent issue with the saved offset or the CDC configuration on the SQL Server side. In such cases, you may need to review your SQL Server CDC setup, ensure no old or conflicting CDC configurations remain, and possibly recreate the Airbyte connection from scratch. If none of these steps resolve the issue, the knowledge sources do not provide further troubleshooting steps specific to this scenario. You may need to seek additional support or review your SQL Server and Airbyte logs for more detailed error information [source-mssql sync fails with CDC and no changes](https://github.com/airbytehq/airbyte/issues/37772). Summary: If clearing and re-syncing does not resolve the error, review your CDC retention settings, ensure the connection is fully reset, and check for any lingering configuration issues. If the error persists, the knowledge sources do not provide a definitive solution beyond these steps.
n
@kapa.ai I still got this error: Failure in source: Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency.
k
A message from kapa.ai
If you are still seeing the error "Failure in source: Saved offset no longer present on the server. Please reset the connection, and then increase binlog retention and/or increase sync frequency." after clearing data and re-syncing, it means Airbyte is unable to find the required CDC log entries (LSN) on your SQL Server source. This typically happens when the retention period for CDC logs is too short, or the sync frequency is too low, causing the necessary log entries to be purged before Airbyte can read them. Based on the knowledge sources: - This error is expected if the commit LSN (offset) Airbyte is trying to use is no longer present in the server's CDC tables. This can occur if there was a period of inactivity longer than the CDC retention period, or if the offset is stale from a previous configuration. Even after clearing data, if the CDC retention is not long enough or syncs are not frequent enough, the issue can persist. - The recommended actions are: 1. Reset (clear) the connection in Airbyte, which you have already done. 2. Increase the CDC retention period on your SQL Server to ensure that log entries are kept long enough for Airbyte to read them, especially if your syncs are infrequent. 3. Increase the sync frequency so that Airbyte reads the CDC logs before they are purged by SQL Server. - If you have already cleared the connection and still see the error, double-check that the CDC retention period is set sufficiently high and that there are no lingering configuration issues. If the problem persists, the knowledge sources do not provide further troubleshooting steps beyond these recommendations [source-mssql sync fails with CDC and no changes](https://github.com/airbytehq/airbyte/issues/37772). In summary: If clearing and re-syncing does not resolve the error, you must ensure your CDC retention period is long enough and/or your syncs are frequent enough. If the error continues after these steps, the knowledge sources do not provide additional solutions, and you may need to further investigate your SQL Server CDC configuration or seek additional support.