Warning: MultiChangesFeed on Continuous push

Hi all,

We recently witnessed this error:
“Warning: MultiChangesFeed: Terminator missing for Continuous/Wait mode” on the sync gateway coming up at a high frequency, when starting continuous pull/push on the iOS version.
CPU goes up but no output on the console for iOS, I assume some loop going on within the library.
This happens after logging in using Facebook and another error “403 wrong user”.

Some logs:

2016-06-07T07:59:41.317Z HTTP: #5988: PUT /zf2016/_local/c4c7729323eed691729ed993374dfca59f9fc20f 2016-06-07T07:59:50.055Z HTTP: #5989: GET /zf2016/_local/37bcc42aa1f70f62be74f26a002506dc45e03c02 2016-06-07T07:59:50.056Z HTTP: #5990: GET /zf2016/_session 2016-06-07T07:59:50.056Z HTTP: #5991: GET /zf2016/_session 2016-06-07T07:59:50.056Z HTTP: #5989: --> 404 missing (1.4 ms) 2016-06-07T07:59:50.094Z HTTP: #5992: POST /zf2016/_facebook 2016-06-07T07:59:50.095Z HTTP: #5993: POST /zf2016/_facebook 2016-06-07T07:59:50.132Z HTTP: #5994: GET /zf2016/_changes?feed=websocket 2016-06-07T07:59:50.229Z WARNING: MultiChangesFeed: Terminator missing for Continuous/Wait mode -- db.(*Database).MultiChangesFeed() at changes.go:185 2016-06-07T07:59:50.337Z HTTP: #5995: GET /zf2016/_local/c4c7729323eed691729ed993374dfca59f9fc20f 2016-06-07T07:59:50.372Z HTTP: #5996: GET /zf2016/_changes?feed=websocket 2016-06-07T07:59:50.469Z WARNING: MultiChangesFeed: Terminator missing for Continuous/Wait mode -- db.(*Database).MultiChangesFeed() at changes.go:185 2016-06-07T07:59:50.469Z WARNING: MultiChangesFeed: Terminator missing for Continuous/Wait mode -- db.(*Database).MultiChangesFeed() at changes.go:185 .........

There seems an unsolved issue with this:

Any ideas?

This happens only when I set the system time of the mobiles to a future date (a single day) for debugging.

Then the iOS library enters an infinite loop in the pull/push replication doing something and causing the warning WARNING: MultiChangesFeed: Terminator missing for Continuous/Wait mode – db.(*Database).MultiChangesFeed() at changes.go:185 on the server.

Clock skew between client and server shouldn’t matter, since sync is based on sequence numbers instead of wall-clock times. So that’s weird.

What does the infinite loop on the client involve? It’s probably a symptom of the server error, but it’d be good to know what’s being logged.

unfortunately that is all I got. on iOS it just got apparent by the cpu usage, no output.
The time didnt matter, until I changed at least by a day.

You can use the time profiler in Instruments to find out what the app is doing in this state. But it may not be necessary to do that if we can get info through other means.

Something similar is happening here: I’m running a simulated iPhone app doing pull replication from another CBL instance (on a Mac), which itself is doing two-way replication with a Sync Gateway.

If I stop the Mac instance, the iOS stops logging CBLSocketChangeTracker messages. When I restart the Mac app, the messages continue.

I’ll be happy to dig further, but for the record, I’m a Couchbase newbie, and only have a vague inkling of what I’m talking about :slight_smile:

Please file a bug report against couchbase-lite-ios on Github.