Froze at DCP: Backfill in progress: 20% (2 / 10)

I have a mobile app that uses Couchbase Lite 2.1 community edition,
I installed Couchbase Server 6.0.0 and Sync Gateway 2.5 community editions on Windows 10. I want to provide replication for the app.

This is my sync-gateway-config.json file:

“adminInterface”: “:4985”,
“interface”: “:4984”,
“log”: ["* “],
“databases”: {
“stock-database”: {
“server”: “http://localhost:8091”,
“bucket”: “stock-database”,
“username”: “sync_gateway”,
“password”: “123456”,
“enable_shared_bucket_access”: true,
“import_docs”: “continuous”,
“users”: {
“GUEST”: { “disabled”: false, “admin_channels”: [”*"] }
“sync”: function (doc, oldDoc) { if (doc.sdk) { channel(doc.sdk); } }

When I run it in CMD, it stucks here:

ence 0 (backfill 0 not in [0-0])
2019-05-16T16:15:39.189-08:00 [INF] DCP: Restarting vb 1022 using metadata sequence 0 (backfill 0 not in [0-0])
2019-05-16T16:15:39.189-08:00 [INF] DCP: Restarting vb 1023 using metadata sequence 0 (backfill 0 not in [0-0])
2019-05-16T16:15:40.243-08:00 [INF] Using metadata purge interval of 3.00 days for tombstone compaction.
2019-05-16T16:15:40.254-08:00 [INF] Reset guest user to config
2019-05-16T16:15:40.254-08:00 [INF] Starting admin server on
2019-05-16T16:15:40.257-08:00 [INF] Starting server on :4984 …
2019-05-16T16:15:40.277-08:00 [INF] CBGoUtilsLogger: Using plain authentication for user sync_gateway
2019-05-16T16:15:40.398-08:00 [INF] DCP: Backfill in progress: 20% (2 / 10)

It does not continue, it just freezes at that point.
What is this? What is happening?

And by the way, this is my Couchbase code in the app:

const stock = new Couchbase(‘stock-database’);

const push = stock.createPushReplication(
const pull = stock.createPullReplication(


module.exports.stock = stock;


Sync Gateway logs the following message at most once every 10 seconds, and given the low number of sequences to be backfilled (10 in this case), it’s likely that the backfill has finished before the next occurrence of the logging happened.

You should be able to use SG at any point after you see the Starting server on :4984 … log message.
Have you tried using SG, or are you thinking it’s frozen because there’s no log output?

@bbrks there is no log output.

Sync Gateway doesn’t log stuff when it’s idle. Try using it

@bbrks i feellike there is no connection between the app cb lite and sync gateway… isn’t my app code correct ?

I can’t see anything obviously wrong with the client code.

Are you able to see Sync Gateway via a web browser?
E.g: http://sync-gateway-host:4984/stock-database

You should see this HTTP request appear in your logs.

@bbrks I don’t think so. Here are my log files, (2.7 KB)


This looks OK to me (and shows Sync Gateway is handling requests to it) - so I’d focus on why your mobile client can’t connect to Sync Gateway.

Do client-side logs indicate a connectivity problem?

@bbrks i see no logs on the console
note that my app is a nativescript app and i use a plugin.

I added the replication code only in app.js as a singleton

I use this plugin

@bbrks If there is replication successfully, I must be able to seethe documents in the couchbase lite db in the bucket on the desktop, too? Right?