Continuous pull replication causing infinite rapid-fire POSTs to /_changes - CouchDB 1.6.1, Couchbase Lite 1.2.0

39 views
Skip to first unread message

Marty Penner

unread,
Mar 29, 2016, 12:30:42 PM3/29/16
to Couchbase Mobile

Wondering if someone can point me in the right direction re: couchbase lite continuous pull replication with a couchdb server. I’m seeing an infinite sync loop that churns through POST requests to local-server/_changes as fast as seems possible. I initially thought it was caused by a corrupt local db, but deleting it and restarting replication causes the same churn repeatedly. I’m on couchdb 1.6.1 and couchbase lite 1.2.0. I'm running a skeleton iOS app, copying + pasting the code examples from the couchbase lite docs.


I have 7 documents in a test database. Here's what the sync progress in the console output in xcode looks like:


https://drive.google.com/file/d/0B4obkCKucQGyOXpzdmo2LWRiOTQ/view?usp=sharing


For reference, the replication code is this:


NSURL* url = [NSURL URLWithString: kServerDbURL];

_push = [self.database createPushReplication: url];

_pull = [self.database createPullReplication: url];

_push.continuous = YES;

_pull.continuous = YES;


NSNotificationCenter* nctr = [NSNotificationCenter defaultCenter];

[nctr addObserver: self

         selector: @selector(replicationChanged:)

             name: kCBLReplicationChangeNotification

           object: _push];


[nctr addObserver: self

         selector: @selector(replicationChanged:)

             name: kCBLReplicationChangeNotification

           object: _pull];


[_push start];

[_pull start];



Any ideas?

Jens Alfke

unread,
Mar 29, 2016, 12:57:18 PM3/29/16
to mobile-c...@googlegroups.com

On Mar 29, 2016, at 12:17 PM, Marty Penner <penner...@gmail.com> wrote:

Wondering if someone can point me in the right direction re: couchbase lite continuous pull replication with a couchdb server. I’m seeing an infinite sync loop that churns through POST requests to local-server/_changes as fast as seems possible. 

Weird! Please file a bug report. We’ll need to see some log output: please enable the ‘ChangeTracker’ logging keyword, copy enough of the log output to show two or more POSTs, save those in a gist or pastie, and add a link to the report.

—Jens

Marty Penner

unread,
Mar 29, 2016, 2:03:17 PM3/29/16
to Couchbase Mobile
Now that I've been able to parse the terminology a little better, I believe I've found an issue identical to mine: https://github.com/couchbase/couchbase-lite-ios/issues/1139. I'll follow that to see where things go. Thanks for the quick response.
Reply all
Reply to author
Forward
0 new messages