Sync freeze, SG 2, Server Ce 5.0.1, CB lite 2.1


#1

Hi,

Since some month, I have a working solution using a couchbase lite 2.1 (xamarin c#) using sync gateway 2 with a couchbase server 5.0.1, on a windows server 2016.

Since yesterday, the sync is freezing, I can see in my xamarin apps that there is 1 doc to sync, but nothing happen.

Here is the sync gateway log :

2018-09-14T08:22:06.488+02:00 HTTP: #1058: GET /mobilotis/_blipsync (as commercial)
2018-09-14T08:22:07.648+02:00 changes_view: Query took 1.1324361s to return 780 rows, options = db.Body{“startkey”:[]interface {}{"", 0x1cdaa}, “endkey”:[]interface {}{"", 0x1d88d}, “stale”:false}
2018-09-14T08:22:07.681+02:00 WARNING: [5693bebc] blipHandler can’t get doc “lot_8817”/2-52055265bbc6e372abe7a137b3f948b6: key not found – rest.(*blipHandler).sendRevision() at blip_sync.go:519
2018-09-14T08:22:10.978+02:00 HTTP: [5693bebc] #1058: --> BLIP+WebSocket connection error: read tcp 192.168.1.100:4984->185.31.149.126:51826: wsarecv: Une connexion existante a dû être fermée par l’hôte distant.

Since the version 2 of sync gateway, I didn’t have any trouble with the sync.

How to know what’s happening ? How to act ?

Regards

Steeve


#2

HI,

Even if it’s just a WARNING in the previous log, I tried to add back the document with the id lot_8817, in case of it could be the origine of the trouble.
Result => The sync unfreezed !

Why a missing document freeze the sync ?

This document was deleted with the sdk. He became useless, so he was deleted.

Why this document stays in sync gateway ?

Steeve


#3

I am unclear on the issue here. Is it the case that if you deleted the document via SDK, that the delete is not getting synced over to the CBL clients?


#4

Hi Priya,

More or less, yes. The document was deleted with the SDK, and the sync with a new client mobile app froze (when you have to sync all initials documents from the server thru sync gateway) .
I had no trouble to sync with a mobile apps regulary sync

Regards

Steeve


#5

Double check your Sync Gateway config file, specifically your import filter. Make sure that deletes are not filtered away


#6

We faced the same issue. On checking the logs, we identified that the sync gateway froze when it came across a document which was deleted. which meant, sync gateway was unaware of the fact that the document was deleted. Hence the sync remained in the busy status forever. we contacted the support team and it seems that a new version (SG 2.1.1) is coming which will fix this issue.


#7

@priya.rajagopal @trustanish1 @househippo @steeve.descarpentrie Is this issue fixed? or any work around?


#8

Did you try with the latest version of SGW and client ? And please provide specifics on the issue that you are facing


#9

@priya.rajagopal
It is exactly the same issue mentioned in fourm,

We are using
Enterprise Edition 5.0.1 build 5003 and SGW 2.0/CBL2.0, Some of documents were removed using SDK IBucket.Remove(key) and some of the documents were stored with expiry property

    IDocument document = new Document<>();
                    document.Content = data;
                    document.Id = key;
                    document.Expiry = expiry;

After those documents hit the expiry periods, are removed from CB.

SGW/CBL still tries to get those documents which are removed/not available in CB server.

SyncMsg+: [6eae5785] #002: Type:subChanges   --> Time:11.1008ms User:xxxxxxxxxxxxxxxxx 
2019-01-04T13:41:27.356-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffff1GNKRFED0CJ323547:240612dddddddddd"/3-31405afbfb614eb75edea36ba049e800: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.356-05:00 Sync+: [6eae5785] Sending rev "fffffffff5UXWX9C54G0D67707:240612dddddddddd" 1-6e819f1d3ba4aaf450a0c34c879cb1e4 based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.357-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffff5UXWX9C54G0D67707:240612dddddddddd"/1-6e819f1d3ba4aaf450a0c34c879cb1e4: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.357-05:00 Sync+: [6eae5785] Sending rev "fffffffff1FASP15J2TW122457:240612dddddddddd" 1-f3d072c33204c4871a62054d1593e535 based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.358-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffff1FASP15J2TW122457:240612dddddddddd"/1-f3d072c33204c4871a62054d1593e535: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.358-05:00 Sync+: [6eae5785] Sending rev "fffffffff2FMTK4APXFBB72260:240612dddddddddd" 1-e0ecc7e6990efa88785107be4b8f32e8 based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.359-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffff2FMTK4APXFBB72260:240612dddddddddd"/1-e0ecc7e6990efa88785107be4b8f32e8: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.359-05:00 Sync+: [6eae5785] Sending rev "fffffffffWBABH7321TEY00804:240612dddddddddd" 1-f2a65ebbe1a35f597fee6a0ffad088eb based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.359-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffffWBABH7321TEY00804:240612dddddddddd"/1-f2a65ebbe1a35f597fee6a0ffad088eb: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.359-05:00 Sync+: [6eae5785] Sending rev "fffffffffWBAKF3C52DJ385607:240612dddddddddd" 1-6b3ffcfda9e8c2fc62ec06f5adebaa6d based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.492-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffffWBAKF3C52DJ385607:240612dddddddddd"/1-6b3ffcfda9e8c2fc62ec06f5adebaa6d: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.492-05:00 Sync+: [6eae5785] Sending rev "fffffffff1FTEW1E80GFA38683:240612dddddddddd" 1-a08b178cddade84e2de06c9ab6692fa3 based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.493-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffff1FTEW1E80GFA38683:240612dddddddddd"/1-a08b178cddade84e2de06c9ab6692fa3: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.493-05:00 Sync+: [6eae5785] Sending rev "fffffffffSALAK2D44BA549777:240612dddddddddd" 1-2122ef26bc5a9a8cc0f69b6bc0fb8085 based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.494-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffffSALAK2D44BA549777:240612dddddddddd"/1-2122ef26bc5a9a8cc0f69b6bc0fb8085: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519
2019-01-04T13:41:27.494-05:00 Sync+: [6eae5785] Sending rev "fffffffffSALSK25449A206691:240612dddddddddd" 1-8f8698a0e2216505f7e864358d59b4e0 based on 0 known.  User:xxxxxxxxxxxxxxxxx
2019-01-04T13:41:27.495-05:00 WARNING: [6eae5785] blipHandler can't get doc "fffffffffSALSK25449A206691:240612dddddddddd"/1-8f8698a0e2216505f7e864358d59b4e0: key not found -- rest.(*blipHandler).sendRevision() at blip_sync.go:519

CBL 2.o frozen to get those document.


#10

Did you try with the latest version of SGW and CBL ?


#11

I have not, I just wanna make sure if it fixed and there is any official bug/Jira that i could reference to.


#12

@priya.rajagopal Just following up, if you got any reference bug/enhancement to this ticket.