Handling SQLite error 13

Hello,

I have an issue with handling SQLite error during couchbase sync.

I’m working on react-native android app that use couchbase community edition (v3.2.2)
During the sync process, when device is running out of disk space I want to handle it by informing the user and stopping the sync process.

I have a replicator change listener that should have change.status.error but this error is not appearing there.

I also tried to handle couchbase exceptions globally in the app but also there was no success.

I can see the SQLite error in android logs:

2025-03-24 15:03:30.944 10409-10677 CouchbaseL...REPLICATOR com.app                    W  Obj=/JRepl@1106012647/C4RemoteRepl#4/Repl#5/Inserter#8/ Coll=0 Failed to insert 'b507c82e-5e0c-4578-8818-e3ddf14defce' #1-606da38124889e0597e39b5b9f56b2e3 : POSIX error 28, "No space left on device"
2025-03-24 15:03:30.945 10409-10677 CouchbaseLite/DATABASE  com.app                    E  SQLite error (code 13): statement aborts at 151: [INSERT OR IGNORE INTO "kv_default" (version, body, extra, flags, sequence, key) VALUES (?, ?, ?, ?, ?, ?)] database or disk is full
2025-03-24 15:03:30.946 10409-10677 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)

Replicator change listener looks like this

this.listenerToken = this.replicator!!.addChangeListener { change: ReplicatorChange ->
                context
                    .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
                    .emit("CouchbaseSyncStatus", Gson().toJson(change.status))
            }

I searched the documentation and this forum but I coudn’t find any clear way to handle this kind of errors.

Does anyone has similar issue or might have an idea how to handle this type of errors?

Change listeners can’t trigger errors. To stop a replication you have to call its stop method.

But if the replicator is already hitting SQLite errors, it should stop by itself without you needing to do anything.

Hello Jens, thanks for the response.

so if the SQLite error should stop replicator then change listener should receive change object with error and status STOPPED like this?

{
  "activityLevel": "STOPPED",
  "progress": {
    "completed": x,
    "total": y
  },
  "error": {
    "domain": "CouchbaseLite.SQLite",
    "code": 13
  }
}

If yes, then something might be wrog as this object never appear in addChangeListener

Yes, that’s what should happen. This seems like a bug.

If you turn on logging and look for errors/warnings in the logs, you may be able to see where the error propagation stops. Let us know if you find something.

Sure, I will try that and let you know, thanks!

So I turn on the debug logs and this is what I get

This is the moment when the firs SQLite error appear

2025-03-28 17:00:43.565 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/BLIPIO#131/ Received frame: REQ #11793 --NC, length    89
2025-03-28 17:00:43.566 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/ Receiving 'rev' REQ #11793 NZ
2025-03-28 17:00:43.567 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/ Finished receiving 'rev' REQ #11793 NZ
2025-03-28 17:00:43.568 19304-19551 CouchbaseLite/NETWORK   com.app                    I  RECEIVED: REQ #11793 NZ {
                                                                                                    	Profile: rev
                                                                                                    	id: ac779263-df2c-48ea-907b-88e18245f28d
                                                                                                    	rev: 1-f4bf8fb862432248d9770779debdbdb1
                                                                                                    	sequence: 3670698
                                                                                                    	Content-Type: application/json
                                                                                                    	BODY: { ... } }
2025-03-28 17:00:43.568 19304-19551 CouchbaseLite/NETWORK   com.app                    D  [JAVA] ^C4Socket.completedReceive@7773275707e0(92)
2025-03-28 17:00:43.571 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#167/ Coll=0 _mayContainEncryptedProperties=0
2025-03-28 17:00:43.572 19304-19559 CouchbaseLite/NETWORK   com.app                    D  [JAVA] CBLWebSocket@@0xf32fbdc{vC4Socket@x7773275707e0 <=> OkHttpSocket@0x2c3f84f(wss://sync-server:443/preview/_blipsync)}.coreAckReceive: 92
2025-03-28 17:00:43.573 19304-19553 CouchbaseL...REPLICATOR com.app                    V     task 4 calling Actor<0x77732756f3f8>
2025-03-28 17:00:43.575 19304-19553 CouchbaseL...REPLICATOR com.app                    V  RevFinder->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.576 19304-19553 CouchbaseL...REPLICATOR com.app                    V     task 4 calling Actor<0x777377497828>
2025-03-28 17:00:43.578 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Repl->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.579 19304-19553 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 activityLevel=busy: connectionState=2, savingChkpt=1
2025-03-28 17:00:43.580 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/ Coll=0 activityLevel=busy: pendingResponseCount=0, _caughtUp=0, _pendingRevMessages=221, _activeIncomingRevs=84, _waitingRevMessages=0, _unfinishedIncomingRevs=151
2025-03-28 17:00:43.581 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377499aa8>
2025-03-28 17:00:43.583 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/BLIPIO#131/ Received frame: REQ #11794 --NC, length    94
2025-03-28 17:00:43.584 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/ Receiving 'rev' REQ #11794 NZ
2025-03-28 17:00:43.585 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Pull->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.587 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#169/ Coll=0 Received revision '2a546262-e3ac-45d1-b1c8-e85ca64aa484' #1-07f844f1c818614f2b5a24d0afe82c27 (seq '3670668')
2025-03-28 17:00:43.588 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#169/ Coll=0 _mayContainBlobChanges=0
2025-03-28 17:00:43.588 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#169/ Coll=0 _mayContainEncryptedProperties=0
2025-03-28 17:00:43.589 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/ Coll=0 activityLevel=busy: pendingResponseCount=0, _caughtUp=0, _pendingRevMessages=220, _activeIncomingRevs=85, _waitingRevMessages=0, _unfinishedIncomingRevs=152
2025-03-28 17:00:43.589 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377499aa8>
2025-03-28 17:00:43.590 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Pull->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.590 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#205/ Coll=0 Received revision '4cfe25c1-dfc0-443e-807d-bee5a5197449' #1-1e53fec7b2a7cbb7acc1433455c3ac20 (seq '3670670')
2025-03-28 17:00:43.591 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#205/ Coll=0 _mayContainBlobChanges=0
2025-03-28 17:00:43.594 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#205/ Coll=0 _mayContainEncryptedProperties=0
2025-03-28 17:00:43.594 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/ Coll=0 activityLevel=busy: pendingResponseCount=0, _caughtUp=0, _pendingRevMessages=219, _activeIncomingRevs=86, _waitingRevMessages=0, _unfinishedIncomingRevs=153
2025-03-28 17:00:43.597 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377499aa8>
2025-03-28 17:00:43.598 19304-19553 CouchbaseL...REPLICATOR com.app                    V     task 4 calling Actor<0x77732756f3f8>
2025-03-28 17:00:43.600 19304-19553 CouchbaseL...REPLICATOR com.app                    V  RevFinder->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.602 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/ Finished receiving 'rev' REQ #11794 NZ
2025-03-28 17:00:43.604 19304-19551 CouchbaseLite/NETWORK   com.app                    I  RECEIVED: REQ #11794 NZ {
                                                                                                    	Profile: rev
                                                                                                    	id: dd2f4532-9a7e-4bd8-b679-e89532894e1e
                                                                                                    	rev: 1-56f3f6a9e3aab8e21f42bae9c8f88ede
                                                                                                    	sequence: 3670700
                                                                                                    	Content-Type: application/json
                                                                                                    	BODY: { ... } }
2025-03-28 17:00:43.605 19304-19551 CouchbaseLite/NETWORK   com.app                    D  [JAVA] ^C4Socket.completedReceive@7773275707e0(97)
2025-03-28 17:00:43.606 19304-19552 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)
2025-03-28 17:00:43.607 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/RevFinder#137/ Coll=0 status=busy from=idle reason=pendingEvent/2
2025-03-28 17:00:43.609 19304-19553 CouchbaseL...REPLICATOR com.app                    V     task 4 calling Actor<0x777377497828>
2025-03-28 17:00:43.609 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/BLIPIO#131/ Received frame: REQ #11795 --NC, length    85
2025-03-28 17:00:43.609 19304-19554 CouchbaseLite/NETWORK   com.app                    D  [JAVA] CBLWebSocket@@0xf32fbdc{vC4Socket@x7773275707e0 <=> OkHttpSocket@0x2c3f84f(wss://sync-server:443/preview/_blipsync)}.coreAckReceive: 97
2025-03-28 17:00:43.609 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/ Receiving 'rev' REQ #11795 NZ
2025-03-28 17:00:43.611 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/ Finished receiving 'rev' REQ #11795 NZ
2025-03-28 17:00:43.613 19304-19551 CouchbaseLite/NETWORK   com.app                    I  RECEIVED: REQ #11795 NZ {
                                                                                                    	Profile: rev
                                                                                                    	id: 68df5cd0-c0c3-4faf-94a7-7a428cd4c2d3
                                                                                                    	rev: 1-907b87451afa531faadca613e0f84431
                                                                                                    	sequence: 3670701
                                                                                                    	Content-Type: application/json
                                                                                                    	BODY: { ... } }
2025-03-28 17:00:43.614 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Repl->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.616 19304-19551 CouchbaseLite/NETWORK   com.app                    D  [JAVA] ^C4Socket.completedReceive@7773275707e0(88)
2025-03-28 17:00:43.618 19304-19553 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 activityLevel=busy: connectionState=2, savingChkpt=1
2025-03-28 17:00:43.619 19304-19556 CouchbaseLite/NETWORK   com.app                    D  [JAVA] CBLWebSocket@@0xf32fbdc{vC4Socket@x7773275707e0 <=> OkHttpSocket@0x2c3f84f(wss://sync-server:443/preview/_blipsync)}.coreAckReceive: 88
2025-03-28 17:00:43.619 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Pull->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:00:43.620 19304-19551 CouchbaseLite/NETWORK   com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/N8litecore4blip10ConnectionE#130/BLIPIO#131/ Received frame: REQ #11796 --NC, length    85
2025-03-28 17:00:43.622 19304-19552 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)

After few minutes this kind of logs are still appearing (no more CouchbaseLite/NETWORK logs)

2025-03-28 17:11:37.768 19304-19553 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 documentEnded e2afb3df-b7d6-4863-b03c-2f7dd43f5699 1-5e022d499e5f1f8c9b47e6c92e3aa45b flags=00 (2/28)
2025-03-28 17:11:37.769 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/ Coll=0 Checkpoint now at '3874947'
2025-03-28 17:11:37.769 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#252/ Coll=0 Received revision '3cff5a8e-f70c-4dfe-a37b-6bb870934886' #1-ddb8cbd4204e7bbe58625c71e018e81e (seq '3875725')
2025-03-28 17:11:37.769 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#252/ Coll=0 _mayContainBlobChanges=0
2025-03-28 17:11:37.771 19304-19551 CouchbaseLite/DATABASE  com.app                    E  SQLite error (code 13): statement aborts at 156: [INSERT OR IGNORE INTO "kv_default" (version, body, extra, flags, sequence, key) VALUES (?, ?, ?, ?, ?, ?)] database or disk is full
2025-03-28 17:11:37.771 19304-19551 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)
2025-03-28 17:11:37.772 19304-19551 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)
2025-03-28 17:11:37.772 19304-19551 CouchbaseL...REPLICATOR com.app                    W  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Inserter#136/ Coll=0 Failed to insert '11f360f8-313e-495c-b97b-a2cdd0639ebf' #1-815a88de58a6bd175a39792f11cd7ade : POSIX error 28, "No space left on device"
2025-03-28 17:11:37.773 19304-19551 CouchbaseLite/DATABASE  com.app                    I  ... SELECT sequence, flags, null, version, length(body), length(extra) FROM "kv_del_default" WHERE key=?
2025-03-28 17:11:37.773 19304-19551 CouchbaseLite/DATABASE  com.app                    I  ... INSERT OR IGNORE INTO "kv_default" (version, body, extra, flags, sequence, key) VALUES (?, ?, ?, ?, ?, ?)
2025-03-28 17:11:37.774 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377497828>
2025-03-28 17:11:37.775 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Repl->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:11:37.775 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 pushStatus=stopped, pullStatus=busy, progress=32175/32537/11633
2025-03-28 17:11:37.775 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 Replicator status collection-wise: pushStatus=stopped, pullStatus=busy, progress=32175/32537, docCount=11633
2025-03-28 17:11:37.776 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 activityLevel=busy: connectionState=2, savingChkpt=1
2025-03-28 17:11:37.776 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377497828>
2025-03-28 17:11:37.778 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Repl->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:11:37.778 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 activityLevel=busy: connectionState=2, savingChkpt=1
2025-03-28 17:11:37.779 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377497828>
2025-03-28 17:11:37.780 19304-19552 CouchbaseL...REPLICATOR com.app                    V     task 3 calling Actor<0x77732756f3f8>
2025-03-28 17:11:37.780 19304-19552 CouchbaseL...REPLICATOR com.app                    V  RevFinder->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:11:37.781 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/IncomingRev#252/ Coll=0 _mayContainEncryptedProperties=0
2025-03-28 17:11:37.782 19304-19553 CouchbaseL...REPLICATOR com.app                    V  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/ Coll=0 progress +1/+0, 0 docs -- now 32217 / 32537, 11633 docs
2025-03-28 17:11:37.782 19304-19553 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Puller#138/ Coll=0 activityLevel=busy: pendingResponseCount=0, _caughtUp=0, _pendingRevMessages=220, _activeIncomingRevs=100, _waitingRevMessages=208, _unfinishedIncomingRevs=100
2025-03-28 17:11:37.783 19304-19551 CouchbaseLite/DATABASE  com.app                    E  SQLite error (code 13): statement aborts at 151: [INSERT OR IGNORE INTO "kv_default" (version, body, extra, flags, sequence, key) VALUES (?, ?, ?, ?, ?, ?)] database or disk is full
2025-03-28 17:11:37.783 19304-19551 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)
2025-03-28 17:11:37.783 19304-19551 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)
2025-03-28 17:11:37.784 19304-19551 CouchbaseL...REPLICATOR com.app                    W  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/Inserter#136/ Coll=0 Failed to insert '63008c14-5535-4a70-8cc0-f848afe4243b' #1-576f996f70c3090aad4a7828ea9f05d5 : POSIX error 28, "No space left on device"
2025-03-28 17:11:37.784 19304-19551 CouchbaseLite/DATABASE  com.app                    I  ... SELECT sequence, flags, null, version, length(body), length(extra) FROM "kv_del_default" WHERE key=?
2025-03-28 17:11:37.784 19304-19551 CouchbaseLite/DATABASE  com.app                    I  ... INSERT OR IGNORE INTO "kv_default" (version, body, extra, flags, sequence, key) VALUES (?, ?, ?, ?, ?, ?)
2025-03-28 17:11:37.785 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Repl->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:11:37.785 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 activityLevel=busy: connectionState=2, savingChkpt=1
2025-03-28 17:11:37.787 19304-19550 CouchbaseL...REPLICATOR com.app                    V     task 1 calling Actor<0x777377497828>
2025-03-28 17:11:37.788 19304-19552 CouchbaseL...REPLICATOR com.app                    V     task 3 calling Actor<0x777377499aa8>
2025-03-28 17:11:37.789 19304-19552 CouchbaseL...REPLICATOR com.app                    V  Pull->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:11:37.790 19304-19552 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 documentEnded 11f360f8-313e-495c-b97b-a2cdd0639ebf 1-815a88de58a6bd175a39792f11cd7ade flags=00 (2/28)
2025-03-28 17:11:37.790 19304-19552 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 documentEnded 63008c14-5535-4a70-8cc0-f848afe4243b 1-576f996f70c3090aad4a7828ea9f05d5 flags=00 (2/28)
2025-03-28 17:11:37.792 19304-19550 CouchbaseL...REPLICATOR com.app                    V  Repl->wss://sync-server/preview/_blipsync performNextMessage
2025-03-28 17:11:37.793 19304-19550 CouchbaseL...REPLICATOR com.app                    I  Obj=/JRepl@1313808178/C4RemoteRepl#133/Repl#134/ CorrID=46b5a4d4 activityLevel=busy: connectionState=2, savingChkpt=1
2025-03-28 17:11:37.793 19304-19551 CouchbaseLite/DATABASE  com.app                    E  SQLite error (code 13): statement aborts at 152: [INSERT OR IGNORE INTO "kv_default" (version, body, extra, flags, sequence, key) VALUES (?, ?, ?, ?, ?, ?)] database or disk is full
2025-03-28 17:11:37.794 19304-19551 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)
2025-03-28 17:11:37.794 19304-19551 CouchbaseLite/DATABASE  com.app                    E  database or disk is full (13/13)

There are also this errors that keep going from ~99.25% to ~99.55% and then starting over

2025-03-28 17:34:09.840 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.25%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:10.034 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.25%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:10.117 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.25%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:10.392 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.27%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:10.417 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.27%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:10.675 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.28%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:10.867 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.28%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:11.111 19304-19552 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.29%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:11.418 19304-19552 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.33%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:11.681 19304-19552 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.34%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:11.921 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.35%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:12.123 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.35%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:12.331 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.36%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:12.567 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.37%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:12.785 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.38%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:13.070 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.39%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:13.307 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.40%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:13.595 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.40%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:13.682 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.41%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:13.758 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.41%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:13.978 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.41%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.065 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.41%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.223 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.42%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.461 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.43%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.527 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.43%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.543 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.43%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.567 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.43%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.664 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.43%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.711 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.44%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:14.856 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.44%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.068 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.44%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.211 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.45%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.217 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.45%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.408 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.45%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.449 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.45%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.706 19304-19553 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.46%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:15.941 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.46%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.207 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.48%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.254 19304-19550 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.48%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.441 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.50%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.511 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.50%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.669 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.50%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.834 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.52%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:16.987 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.53%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:17.207 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.54%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:17.211 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.54%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:17.436 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.55%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:17.439 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.24%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:17.500 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.24%, error=POSIX error 28, "No space left on device"
2025-03-28 17:34:17.670 19304-19551 CouchbaseL...REPLICATOR com.app                    E  Obj=/JRepl@1313808178/C4RemoteRepl#133/ State: busy, progress=99.25%, error=POSIX error 28, "No space left on device"

It looks like the replicator doesn’t treat this error as fatal, so it skips the revision and keeps going. So you should detect the error in your change listener, and tell the replicator to stop.

(I’m not familiar with the Java/Kotlin API; there may be multiple listener methods, but one of them tells you about individual documents, including errors.)

It does seem like a disk-full error should be considered fatal by the replicator. I’ll file an issue so we can add that.