Sync Issues appear and vanish randomly

Dear All,

We’ve built a complex SaaS app and are close to launching it. We’re hopeful to have millions of users someday, but maybe today is not that day.

What affects our confidence is that every other month, the syncing becomes erratic and slows down. We contact support (paid), and they give us the standard template on destructive changes. So we follow the playbook… we terminate/restart the sync, uninstall/install the app from devices, and then this issue gets solved in two or three days automatically.

  1. This happens every other month. We lose 2-3 days of time over this.
  2. We escalate to support but we NEVER know exactly what has gone wrong, we are not given any answers.

The above events make us question our decision to use the realm. We’ve never had this issue with Realm Legacy.

Does anyone else have this issue? Putting this out there in case anyone has similar stories to share OR has found specific causes and solutions

Sincerely,
Prateek

4 Likes

Thanks for sharing this, support should be able to give a specific answer as to what is causing this…

2 Likes

Hi,

I am facing the similar issue.
Looking for solution for quite some time, but didn’t find any.

regards,
Vishnu

1 Like

Are you making destructive/breaking schema changes ? Or is it just normal usage and the sync becomes slow?

3 Likes

This is all just normal usage & we know how to handle destructive breaking
Hi Ian,

We are not making destructive/breaking schema changes (we know how to handle those via terminate/restart the sync and uninstall).

Our problem is with normal usage where sync becomes slow without explanation. And this sometimes mysteriously corrects itself after a few days.

Regards,
Prateek

1 Like

There is a backend process called compaction that is triggered to reduce the sync history log based on a heuristic that runs non-deterministically. Its possible that your partition history grows in size, becomes slower to download, and then compaction triggers, compressing the history. You are free to open a support ticket to manually trigger this compaction should your run into this in the future again.

You would find performance improved by moving to Flexible Sync as this mode of syncing does not store the history and just sends the state to clients.

2 Likes