Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

_changes stop working in iOS 10 #86

Open
pasin opened this issue Oct 10, 2016 · 6 comments
Open

_changes stop working in iOS 10 #86

pasin opened this issue Oct 10, 2016 · 6 comments
Labels
Milestone

Comments

@pasin
Copy link
Contributor

pasin commented Oct 10, 2016

The issue originated from couchbase/couchbase-lite-ios#1477.

I believe it's the issue is caused by either the HTTP Client or iOS WebKit. We should do some testing on this.

@msanilkumar2020
Copy link

Any update on this issue?

We are not getting _changes in iOS.

Thanks,
Anil Kumar

@pasin
Copy link
Contributor Author

pasin commented Oct 12, 2016

Sorry, we don't have any update. Can you post exact the _changes request including all parameters that you are using? What is the HTTP client you are using to make _changes request in the application?

@Crapulax
Copy link

Crapulax commented Oct 12, 2016

To provide a bit more information, we workarounded the issue by:

  • setting a _changes heartbeat* to 20s (20000). Using a timeout of 40s at the http level was also working.
  • reinitializing the listen when app move from background to foreground
    Note that resume reinialization was tricky because we had to know if the issue had occured or not. We determine this by keeping last sequence received by _changes and comparing it with update_seq from DB. If they are equal we loop on it in case it is down.

Above is not satisfactory as it requires tricky computations.

*heartbeat: edited (wronly wrote timeout)

@pasin
Copy link
Contributor Author

pasin commented Oct 12, 2016

I believe a better approach would be adding heartbeat=30000 to the longpoll _changes feed request URL. Another option would be adding timeout to _changes feed request BUT currently couchbase-lite-ios doesn't support _changes feed timeout yet (See couchbase/couchbase-lite-ios#1236).

FYI, we did experience that some HTTP clients do not abort the requests properly after timing out so the requests get stuck and have never returned the result (See https://github.com/couchbase/couchbase-lite-java-core/issues/1296 for more info).

@Crapulax
Copy link

Sorry Pasin, I wrongly wrote timeout, we should read heartbeat instead. I update my post accordingly.

I am checking right now if using a promise as timeout can let us remove the tricky stuff on app resume

@pasin
Copy link
Contributor Author

pasin commented Oct 12, 2016

@Crapulax Thanks for the update.

@djpongh djpongh added this to the 2.2.0 milestone Jun 6, 2017
@djpongh djpongh added the icebox label Jun 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants