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.