Skip to content

db-sync daemon silently stops syncing — large version gap between DB and Mergin Maps project (v26 DB vs v92 GPKG) #179

@afourneyron

Description

@afourneyron

Environment

  • Mergin Maps: self-hosted instance via Docker (CE) version 2.1.1
  • db-sync: Docker container (lutraconsulting/mergin-db-sync)
  • Database: PostGIS (PostgreSQL)
  • Init mode: --init-from-gpkg
  • Projects: Multiple production projects initialized with DB Sync, each with dedicated schemas

Description

We are running db-sync in production against a self-hosted Mergin Maps instance. Synchronization initially works correctly — data collected on mobile devices appears in the PostgreSQL database as expected.

However, at some point the daemon appears to stop syncing silently: the Docker container keeps running (no crash reported, no restart), but new changes from Mergin Maps are no longer applied to the database. There is no visible error or alert.

We only discovered the issue by noticing a growing discrepancy between database content and what was visible in the Mergin Maps web interface and mobile app.

Observed state:

  • Mergin Maps project (web + mobile): v92
  • GPKG file: v92
  • PostgreSQL database (base + modified schemas): stuck at v26
  • ~2,000 records collected between v26 and v92 were missing from the database
  • Users continued collecting data normally on the mobile app without any issue

Steps to reproduce

We cannot reliably reproduce the issue on demand, but the sequence appears to be:

  1. db-sync is initialized from GPKG and runs correctly for a period of time
  2. At some point (possibly triggered by a network hiccup, a large changeset, or a geodiff error on a specific diff), the daemon stops applying changes to the database
  3. The Docker container remains in a running state — no restart, no error in the console output we observed
  4. New versions continue to be pushed to Mergin Maps by mobile users without any problem
  5. The database version counter freezes while the Mergin project version keeps incrementing

Questions / requests

  1. Is there a known condition that causes the daemon to silently stop applying changes without exiting?
  2. Is there a way to resume sync from a specific project version without a full --force-init (to avoid data loss in case of future incidents)?
  3. Are there recommended log verbosity settings and monitoring practices for production deployments?
  4. Are you planning any future versions of Mergin Maps?

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions