Data is not getting synced

I am using couchbase lite 2.6.2, couchbase server 6.0 and sync gateway 2.0 in my app. In the android app, data is getting synced very late.
Scenario 1: Data from the app is not getting pushed to the server if we created/updated data in offline mode.
Scenario 2: In my app, one user can send data to others. The receiver is unable to pull the data even if the app is open and the replicator is started. The data is getting pulled after the user is logging in again but otherwise, he has to wait for unknown time for data to sync.
I need help on this sync issue with both scenarios and also want to know does a mobile device’s RAM and internet speed affects data sync speed? If yes, then what are the basic required RAM and internet speed that should be there?

In order for us to do anything about your issue, you really have to provide some kind of evidence that something is going wrong. Not that you we need you to prove that a problem exists, just that we need half a clue about what the problem is. We’ll need the description of a specific, preferably repeatable, scenario in which you expect one thing to happen and, instead, something else happens. Code always helps.

RAM probably doesn’t affect it, since I assume the device does not have VM paging. (iOS does not; I don’t know about Android but I assume not.)

Internet speed obviously affects any kind of network connection. The exact amount is impossible to say without knowing a lot of details.

Android does not page.