Skip to content

Replication issue diagnostics #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

rkistner
Copy link
Contributor

This uses the persisted timestamp for last commit/keepalive to report replication issues in the diagnostics API.

If the replication stream is idle, a new keepalive should be performed once every minute. This means we cannot test more granular than that, but this should report cases where:

  1. The replication process is down completely.
  2. The replication process is active, but does not perform any new commits. One example of such a case is in [MongoDB] Fix resume token handling when no events are received #251.

However, this will not detect cases where the replication process makes progress but falls behind. For those cases, monitor the powersync_replication_lag_seconds metric instead.

This change also reduces the Postgres keepalive message interval from 5 minutes to 1 minute. We already have a different keepalive mechanism in MongoDB doing the same.

TODO:

  • Check keepalives for MySQL replication.

Copy link

changeset-bot bot commented Jul 17, 2025

🦋 Changeset detected

Latest commit: 0c224d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@powersync/service-core Minor
@powersync/service-image Minor
@powersync/service-core-tests Patch
@powersync/service-module-core Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
test-client Patch
@powersync/service-schema Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant