Couchbase lite initial replication crashes


I have a question regarding the replication on couchbase-lite :

When I start a big replication, it seems to crash silently (I can’t find any log), and I have to start it again in order to get it running back. It fails mainly on old devices (iOS/Android), so I’m wondering if this has something to do with the device CPU being to much sought.

I have read this part of the documentation : (the part with Guaranteed Order Delivery / Maximum Throughput / Extreme Configurability ), but I don’t know if this has a link with my problem.

Here’s an extract of my code (java) starting the replication, if someone sees anything, feel free to correct me :slight_smile:

public static Replicator startReplication() {
    Log.i(TAG, "Replication Start with " + syncUsername);
    try {
        // Réinitialise le total
        notifDocumentTotal = 0;

        // Contrôle des données de réplications
        if(syncUrl == null || syncChannel == null) {
            throw new Exception("Informations du Replicator absentes");
        } else if(replicator != null) {
            Log.i(TAG, "Replication Exists");
            return replicator;

        Endpoint targetEndpoint = null;
        try {
            targetEndpoint = new URLEndpoint(new URI(syncUrl));
        } catch (URISyntaxException e) {
            Log.e(TAG, e.getMessage());

        // Create replicators to push and pull changes to and from the cloud.
        ReplicatorConfiguration config = new ReplicatorConfiguration(database, targetEndpoint);
        // Limitation au channel de l'utilisateur
        // Authentification
        config.setAuthenticator(new BasicAuthenticator(syncUsername, syncPassword));

        // final CountDownLatch latch = new CountDownLatch(1);
        replicator = new Replicator(config);
        // Listener
        replicator.addChangeListener(new ReplicatorChangeListener() {
            public void changed(ReplicatorChange change) {
                // Handling Errors
                CouchbaseLiteException error = change.getStatus().getError();
                if (error != null) {
                    Log.i(TAG, "ReplicatorChange error : " + error.getInfo());

                // Activities
                syncReplicatorStatus = change.getStatus().getActivityLevel().toString();
                syncReplicatorProgressCompleted = change.getStatus().getProgress().getCompleted();
                syncReplicatorProgressTotal = change.getStatus().getProgress().getTotal();
                Log.i(TAG, "Replicator activity : " + change.getStatus().getActivityLevel());

                // Fin de réplication
                if(database != null && change.getStatus().getActivityLevel().toString().equals("IDLE")) {
                    // On force le décallage (bug CBL) en fin de réplication
                    syncReplicatorProgressCompleted = 100;
                    syncReplicatorProgressTotal = 100;
                    Log.i(TAG, "Database change count : " + database.getCount());
        // Start replication.
    } catch (Exception e) {
        Log.e(TAG, e.getMessage());

    return replicator;

Thanks a lot

Hmmm…don’t you have logging enabled ? Did you check the console output from debugger (Xcode or Android Studio)? Please share the log output along with details of the version of CBL that you are using.