Is there away to know the connection is stuck and needs a manual restart?

I am brand new to couchbase and trying to do simple syncing. While it works, there are times the syncing appears to be stuck. I have to kill the app and restart it and then the syncing starts again. Following many questions here, I had tried to make sense from the android logs and nothing odd. I do see the app going to BUSY then IDLE then BUSY again.

At this stage, I am wondering if the connection somehow is stuck for whatever reason that restarting it triggers a successful sync. I have noticed it happens mostly after a successful sync followed by a period of no activity then I do something but it doesn’t do anything. Similarly, I added documents to couchbase that don’t get synced automatically until i restart the app.

For now, I am focused on the app since restarting it is easier than the sync gateway side itself but is there a way I can know the connection might be stale so a manual restart of the replicator is needed? I noticed the state is IDLE when it happens so is it a good way to basically say for e.g. if IDLE continuously for 10 minutes, restart?

So again, my question is how long would be considered to long

The one piece of information that you did not supply is why you think it is stuck. IDLE is a normal replication state. Replicators I idle when there is nothing to do, and become BUSY when there is something to do again. Do you have an actual problem?

oh. i was just wondering why documents I see in my couchbase and sync gateway don’t sync down to the app unless I restart the app sometimes, that’s all. forgive me i asked such a stupid question, you are right.

Not a stupid question at all!!

In order to deal with the issue, though, we need to know what the issue is! Why do you believe that the documents don’t sync?? How long are you waiting to see them sync (10 minutes would, indeed, be a long time) Do you have the logs of a replication that leaves some docs unsynched?

We just need more information to work this.