CB Lite on Android Xamarin fails to replicate when local DB is large

I am using CB Lite 1.3.1 on Android in a Xamarin-based application. The application logs about 1 small data item per second into Couchbase. It also updates a few documents about once per second.
I am using SQLite as a storage engine for CBLite. I am using Sync Gateway to replicate the database to Couchbase Server.

When the local database reaches a size of 100K-200K docs (100-200 MBytes) the push replication fails to start. I am using a non-continuous push replication. Its Status property is ‘Active’, IsRunning is true, ChangesCount is 0, CompletedChangesCount is 0.

For this replication the Sync Gateway log shows no activity. So it seems that the pusher doesn’t even get as far as connecting to the gateway.

Am I pushing CB Lite too far with this ?

I sometimes see the process appear to hang during a bulk docs upload because nothing will be logged when the data is in the process of being transmitted. Unless I goofed the math it appears your documents are 1 MB on average? Couchbase Lite will transmit them in batches of 50, and 50 MB can take a while to upload depending on your connection. If that is the case then the last thing you should see in the sync gateway logs from that client is a request to _bulk_docs. Can you show the sync gateway output, and the logs from couchbase lite as well (they will be logged to logcat under the mono-stdout tag).

No. The documents are about 1 KByte in size. 100000…200000 docs make a database that is about 100…200 MBytes large. I’ll post the logs.

That’s what I get for doing math first thing in the morning…

It might be better if you file this as an issue on the repo. It’s going to be hard for me to reproduce because I don’t have a 200 MB database lying around but I’ll see what I can find.

Any errors/warnings logged to the console? Have you turned on extra logging for the replicator?

Submitted #742

How do I turn on the extra logging ?

This page will help you out with logging -> https://github.com/couchbase/couchbase-lite-net/wiki/Tracing--&-Logging

It’s in the official docs too, under Global Logging Settings.

To be fair, though, the C# tab of that page is incomplete @jamiltz

I’ll try running with this:
Couchbase.Lite.Util.Log.Domains.Sync.Level = Couchbase.Lite.Util.Log.LogLevel.Verbose;

The more verbose log is attached #742

Docs for logging updated.

Changes: https://github.com/couchbaselabs/couchbase-mobile-portal/commit/dd69770611fc519d22812522bbef905344f2527b