Replicator in Android get stuck at busy state when it goes back to online from offline

My current fix is:

  • Create a user account with only 1 document
  • in loop:
    • Update document periodically
    • Wait several seconds
    • Check if replicator status is still busy
    • if it is still busy then ssh into server and restart SG service

I tested the setup without automatic service restarts for a day or two and could confirm that the sync status was busy (and stopped syncing) on my other devices which ran the production app. The service is restarted between 1 and 3 times per day. I wasn’t able to find any firewall/port time outs. I think my issue is that the write queue grew too big on the SG server as pointed out by @bbrks in this post.