Meteor-Community-Packages / ground-db

GroundDB is a thin layer providing Meteor offline database and methods
https://atmospherejs.com/ground/db
MIT License
572 stars 77 forks source link

GroundDB doesn't sync data to live server when getting online again after a while #214

Open Jessedev1 opened 2 years ago

Jessedev1 commented 2 years ago

Hi,

Since we updated to a newer Meteor version (1.8 > 2.5) we are having problems with our app running offline.

I've tested the following

  1. I turn off the wifi on my phone
  2. I do a database update
  3. I turn my wifi back on

When i do this right after each other everything works fine, but when I wait a couple of minutes (30 minutes) before turning my wifi back on the data won't be updated.

Do you have an idea of what is going on and how to fix this?

boomfly commented 1 year ago

After some time Meteor stop trying to reconnect, so you should listen some sort 'internetAvailable' event and manually call Meteor.reconnect or check connection status and show user button with reconnect function

paranoico commented 1 year ago

@Jessedev1 We still use these component: Auto reconnect

As far as i know, Meteor reconnection uses a longer wait time after each failed attempt ("2 power n" seconds or something like that). So we configured the component with a 5 or 10 seconds timing in order to avoid long pause waiting.