Push replication stops and work on App restart

Hi All,
We are using Android CBL 1.4.1, SG 1.4, CBS 4.6.2.

We have been very happy with the sync as it syncs data every time no matter what time it takes. The time can be from milliseconds to 10 seconds. But the documents syncs every time.

Until now suddenly documents when changed are not syncing.

I used a proxy (Fiddler) to see if the app is sending data to sync gateway Answer is No. It is asking for _changes though but no one apart from the instance being debugged is changing data.

I Used tail -f sync_gateway_error.log I see nothing coming.

When I see Android logs I don’t see anything happening in logs. Even when the logging level is set to verbose.

Last sequence number do increase after each document is synced.

No calling inside change listener of database and push replication.

Replication Status is not Offline. It is Idle.

All data syncs when we restart the app because on restart. We are running One shot in Pull on app start and then change it to continuous if there is not error and status is stopped. But push is always in continuous mode.

Now please help me with a TIP how I can debug it. Any specific log on android/sync gateway ?

Its a bit urgent any help will be appreciated.

Pankaj Sharma

What’s changed? Did any software get upgraded? Any change in hosting or network topology?

(I can’t give you detailed help because I don’t know Android.)

This was purely app issue. Because in android database helper should always be a singleton but somehow due to change in architecture the singleton was broken. And there were multiple instances of database objects were created. This made sync unreliable.

I logged database object hashcode and when I found it different , the first thing I asked team to correct it to singleton and it works.