For offline users, how often does the app try to refresh if there is an available internet connection?

If I am an offline user with an internet connection, how often will the app try to open a connection and sync? Is this configurable?

2 Likes

Originally the Core Framework held a continuous connection open so that as soon as there was a change either in CouchDB or the local PouchDB it was replicated to the server. This had some serious performance limitations so the algorithm was changed in 3.4.0.

Since 3.4.0 replication is attempted when…

  • the app starts up,
  • the user clicks the “sync now” button,
  • the browser detects the user has come back online, or
  • five minutes has passed since the last replication.

This is not configurable.

There is a further improvement proposed for 3.9.0 that would initiate a replication as soon as any doc is created or updated on the phone.

Also note that there is a second database for user specific data such as telemetry data and which docs the user has seen. Because this data is less time sensitive the replication of this database is attempted on a 30 minute interval.

1 Like

If you tap on “Sync now”… does it sync the user database as well or is that always just on the 30 minute interval?

The user’s meta database is always on the 30 minute interval. To force it to sync now you have to reload the app to clear the interval.

2 Likes