Couchbase Replication stopped when we keep application ideal long time

Hi,
We are using coucbase lite v2.1.2 in iOS Swift and we are planning to go for production with a licensed version of couchbase server.

We are getting some issues before we are going to production. We are using single node right now and our application always in active state and user will not close the app but after some time but application replication going to stopped and if i do any operation in another device, those changes are not affecting in my active application, But if i restart the app, it works well.

Can you please assist us, what is the main issue?

Here you can find verbose log

Is it a continuous replication? If so, it should never go into the Stopped state unless you explicitly stop it.

You only showed the last second or two of the log. In that time I see the replicator disconnecting cleanly, with no issues.

@jens Thanks for your reply, Here you can find my replicaiton code and replication log

Note: I have two applications called Application A and Application B. Application A runs on iPhone and iPad and i didn’t face any issue and it doesn’t stop replication yet all. But it sync only few of documents based on channels.

Whereas Application B runs on iPad only and it sync huge data like around 10k records and it is the bridge for All Application A. But Application B stopped replication after couple of minutes.

Seems it causes livequery, see latest attachment and link

22%20PM

I don’t have permission to access the logs at that link.

it is the bridge for All Application A

what does that mean? Are you using peer-to-peer replication?

Seems it causes livequery

What do you mean by that? The screenshot and thread dump just show that the replicator change listener is being called. I can’t tell from there why it was called, since the call is asynchronous.

Here you can find the link again
Yes i am using peer to peer replication and i never stop replication but i am worrying why it is getting stop sometimes. where my other app not stopping just keep in ideal state only.

Near the end of the log I see:

2018-12-11 08:03:21.736694+0530 My App[1926:61841] CouchbaseLite Sync Info: {Repl#109} now idle
2018-12-11 08:03:21.736898+0530 My App[1926:61841] CouchbaseLite Sync Info: CBLReplicator[<*> URL[ws://objectsourceincapps.com:4984/costalerts/]] is idle, progress 0/0, error: (null)
Online
------- PushPull Replicator: 0/0, error: nil, activity = idle and replicator pushAndPull
--------All records are done
2018-12-11 08:03:21.737259+0530 My App[1926:61841] CouchbaseLite Sync Info: {Repl#109} Told to stop!

The “Told to stop” log occurs only when the replicator is explicitly told to stop. (Actually it can also happen when the replicator is suspended because the app was backgrounded, but that would first produce another log saying Set suspended = 1.) So it appears that you called stop on the Replicator.

@jens
I cross verified my code and somewhere i wrote the code like stop replication explicitly and i will observe more and then i will close this.

Thanks for your assistance.