Sync Gateway _active_tasks always empty

One of my applications requirements is the administrators would like to be able to look at a dashboard and see the status of sync on all of the tablets in the field.

I found documentation of the _active_tasks REST end point here: However running curl http://localhost:4985/_active_tasks always returns [].

We have a database that is around 100 GB so these are all very long running syncs and looking at the logs on my Android device I can see in that the replication is still running but nothing is getting returned.

Should I be able to see the replications that are initiated from the Android SDK by using that API? If so is there something special that must be done to make that work?


That link is for managing replications between Sync Gateway instances. The /{db}/_active_tasks endpoint tracks replication that are initiated by Sync Gateway. As shown on the diagram, it’s typically used between Sync Gateways.

With mobile devices (Couchbase Lite), the replication is initiated on the client and so the replication can be tracked there using the native APIs

Ah that makes sense. thanks.

Is there any way to do what we are looking for? We want to build a website Dashboard that quickly shows the status of synchronization of all of our tablets.


You can only track progress on the client using the replication change event.

To know when it’s completed you could have an acknowledgement document with the user/device details written by the client once it received everything. The dashboard app would then update the status once that document appears on the Sync Gateway changes feed. This guide has details for how to consume it from the REST API.


yeah our web app is going to be consuming a lot of stuff via the REST api so that is no problem. I was just hoping there was a nice way to see progress from the gateway side without having to write that acknowledgement doc ourselves, but that is no problem we’ll write docs and replicate a different bucket back up to the server to track progress. Thanks for your help.