Huge local storage usage because of CBLite?

Hi,

we’ve now been using Couchbase Lite for a few months in our app. While we’re constantly uninstalling / redeploying the application to our devices certain issues don’t occur to us.
Following the issue of a heavy user of our application:

The app has been installed for quite some time and as you can see the application data is way over one GB. I assume CBLite saves alot of revisions locally and they’re never deleted.

So what can we do about it? Is this a known issue? Do we miss something here?

Note: StorageEngine is set to SQLite.

Further note: The database of the user isn’t this big. Once he logs into the synchronization the docs get synced and the app data is around 40 MB. Afterwards it constantly fills up once changes occur - so it must be related to the revisions.

Does your app ever compact the databases? Otherwise yes, it keeps growing.

(Note: in 1.3 or later there will be less growth, but you do still need to compact. )

Thank you for the quick response.

So I need to call compact() on the database object and it’ll delete all revisions older than maxRevTreeDepth. Good to know, never stumbled across it while implementing CBLite in my application. :wink:
Thanks again.

It’s documented in the Database guide under Housekeeping.

One more question: According to the documentation the compaction may take several seconds or more, and it blocks access to the database. Since compact() doesn’t return anything how do I tell if the compaction is finished?

It’s finished when the compact() method call returns.

Today I’ve used the dataset of one of our users which had more than one GB in order to test how fast compact() is. Unfortunately the method didn’t finish. It did run for more than two minutes until the application crashed because I’ve been running out of disk space on my smartphone. Following the LogCat outputs during the compact and the Stacktrace once the app crashed:

08-09 18:52:04.049 27490-27496 W/art: Suspending all threads took: 5.263ms
08-09 18:52:04.391 27490-27607 V/RenderScript: 0x9db18000 Launching thread(s), CPUs 4
08-09 18:52:08.865 27490-27500 I/art: Background sticky concurrent mark sweep GC freed 72426(3MB) AllocSpace objects, 6(824KB) LOS objects, 12% free, 27MB/31MB, paused 2.155ms total 111.762ms
08-09 18:52:09.557 27490-27496 W/art: Suspending all threads took: 5.850ms
08-09 18:52:11.801 27490-27500 I/art: Background sticky concurrent mark sweep GC freed 106019(6MB) AllocSpace objects, 64(5MB) LOS objects, 26% free, 30MB/41MB, paused 5.840ms total 82.391ms
08-09 18:52:48.642 27490-27496 W/art: Suspending all threads took: 16.668ms
08-09 18:52:49.861 27490-27500 I/art: Background sticky concurrent mark sweep GC freed 70893(3MB) AllocSpace objects, 21(2MB) LOS objects, 13% free, 36MB/41MB, paused 1.965ms total 160.193ms
08-09 18:52:51.148 27490-27496 W/art: Suspending all threads took: 17.373ms
08-09 18:52:51.152 27490-27500 I/art: Background partial concurrent mark sweep GC freed 88989(4MB) AllocSpace objects, 28(4MB) LOS objects, 32% free, 33MB/49MB, paused 2.618ms total 168.807ms
08-09 18:52:51.714 27490-27496 W/art: Suspending all threads took: 81.650ms
08-09 18:53:10.637 27490-27600 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24437 (AsyncTask #1) with flags 0x1 for 30.072 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 20495ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:13.174 27490-27677 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24458 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-4) with flags 0x1 for 30.000002 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 23195ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:17.187 27490-27496 W/art: Suspending all threads took: 11.410ms
08-09 18:53:18.713 27490-27564 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24420 (CBLManagerWorkExecutor) with flags 0x2 for 30.000002 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 28733ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:19.573 27490-27666 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24455 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-3) with flags 0x1 for 30.001001 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 29593ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:40.698 27490-27600 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24437 (AsyncTask #1) with flags 0x1 for 60.408005 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 50710ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:43.175 27490-27677 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24458 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-4) with flags 0x1 for 60.001003 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 53196ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:48.714 27490-27564 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24420 (CBLManagerWorkExecutor) with flags 0x2 for 60.002003 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 58734ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:53:49.573 27490-27666 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24455 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-3) with flags 0x1 for 60.001003 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 59594ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:10.702 27490-27600 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24437 (AsyncTask #1) with flags 0x1 for 90.422005 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 4488ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:13.176 27490-27677 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24458 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-4) with flags 0x1 for 90.00201 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 6962ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:18.716 27490-27564 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24420 (CBLManagerWorkExecutor) with flags 0x2 for 90.003006 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 12502ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:19.574 27490-27666 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24455 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-3) with flags 0x1 for 90.00201 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 13361ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:40.737 27490-27600 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24437 (AsyncTask #1) with flags 0x1 for 120.45701 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 34523ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:43.177 27490-27677 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24458 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-4) with flags 0x1 for 120.003006 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 36963ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:48.716 27490-27564 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24420 (CBLManagerWorkExecutor) with flags 0x2 for 120.004005 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 42503ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:54:49.575 27490-27666 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24455 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-3) with flags 0x1 for 120.003006 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 43362ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:55:10.777 27490-27600 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24437 (AsyncTask #1) with flags 0x1 for 150.49701 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 64563ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:55:13.177 27490-27677 W/database: SQLiteConnectionPool: The connection pool for database '/data/user/0/my.package.name/files/couchbase_database.cblite2/db.sqlite3' has been unable to grant a connection to thread 24458 (CBLRequestWorker-http://my.url.com:80/my_database-push-f8785-4) with flags 0x1 for 150.003 seconds.
                                           Connections: 1 active, 0 idle, 0 available.
                                           
                                           Requests in progress:
                                             executeForChangedRowCount started 66964ms ago - running, sql="DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0"
08-09 18:55:13.851 27490-27490 E/SQLiteLog: (13) statement aborts at 70: [DELETE FROM revs WHERE doc_id=? AND revid < ? AND current=0] 
08-09 18:55:14.375 27490-27490 E/SQLiteLog: (1) statement aborts at 2: [;ROLLBACK TO cbl_1] no such savepoint: cbl_1

Stacktrace:

08-09 18:55:14.483 27490-27490 E/Database: main Error calling endTransaction()
                                           com.couchbase.lite.storage.SQLException: com.couchbase.lite.internal.database.sqlite.exception.SQLiteException: no such savepoint: cbl_1 (code 1)
                                               at com.couchbase.lite.storage.SQLiteStorageEngineBase.execSQL(SQLiteStorageEngineBase.java:157)
                                               at com.couchbase.lite.store.SQLiteStore.endTransaction(SQLiteStore.java:2156)
                                               at [Some class - stripped]
08-09 18:55:14.483 27490-27490 E/SQLiteLog: (1) statement aborts at 2: [ROLLBACK;] cannot rollback - no transaction is active
08-09 18:55:14.486 27490-27490 D/AndroidRuntime: Shutting down VM
08-09 18:55:15.317 27490-27500 I/art: Background sticky concurrent mark sweep GC freed 131063(7MB) AllocSpace objects, 44(6MB) LOS objects, 27% free, 36MB/49MB, paused 5.834ms total 145.756ms
08-09 18:55:17.554 27490-27500 I/art: Background partial concurrent mark sweep GC freed 180382(9MB) AllocSpace objects, 19(2MB) LOS objects, 29% free, 38MB/54MB, paused 2.067ms total 122.946ms
08-09 18:55:18.569 27490-27490 W/GAv4: syncDispatchLocalHits timed out: java.util.concurrent.TimeoutException
08-09 18:55:19.001 27490-27496 W/art: Suspending all threads took: 122.485ms
08-09 18:55:19.008 27490-27529 W/SharedPreferencesImpl: writeToFile: Got exception:
                                                        java.io.IOException: write failed: ENOSPC (No space left on device)
                                                            at libcore.io.IoBridge.write(IoBridge.java:498)
                                                            at java.io.FileOutputStream.write(FileOutputStream.java:186)
                                                            at com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:232)
                                                            at com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:253)
                                                            at com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:198)
                                                            at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:193)
                                                            at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:600)
                                                            at android.app.SharedPreferencesImpl.-wrap2(SharedPreferencesImpl.java)
                                                            at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:515)
                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                            at java.lang.Thread.run(Thread.java:818)
                                                         Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left on device)
                                                            at libcore.io.Posix.writeBytes(Native Method)
                                                            at libcore.io.Posix.write(Posix.java:271)
                                                            at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
                                                            at libcore.io.IoBridge.write(IoBridge.java:493)
                                                            at java.io.FileOutputStream.write(FileOutputStream.java:186) 
                                                            at com.android.internal.util.FastXmlSerializer.flushBytes(FastXmlSerializer.java:232) 
                                                            at com.android.internal.util.FastXmlSerializer.flush(FastXmlSerializer.java:253) 
                                                            at com.android.internal.util.FastXmlSerializer.endDocument(FastXmlSerializer.java:198) 
                                                            at com.android.internal.util.XmlUtils.writeMapXml(XmlUtils.java:193) 
                                                            at android.app.SharedPreferencesImpl.writeToFile(SharedPreferencesImpl.java:600) 
                                                            at android.app.SharedPreferencesImpl.-wrap2(SharedPreferencesImpl.java) 
                                                            at android.app.SharedPreferencesImpl$2.run(SharedPreferencesImpl.java:515) 
                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                                            at java.lang.Thread.run(Thread.java:818) 
08-09 18:55:19.353 27490-27540 E/Fabric: An error occurred in the fatal exception logger
                                         java.io.IOException: write failed: ENOSPC (No space left on device)
                                             at libcore.io.IoBridge.write(IoBridge.java:498)
                                             at java.io.FileOutputStream.write(FileOutputStream.java:186)
                                             at com.b.a.c.f.c(CodedOutputStream.java:668)
                                             at com.b.a.c.f.a(CodedOutputStream.java:794)
                                             at com.b.a.c.f.c(CodedOutputStream.java:740)
                                             at com.b.a.c.f.a(CodedOutputStream.java:325)
                                             at com.b.a.c.f.a(CodedOutputStream.java:204)
                                             at com.b.a.c.aa.a(SessionDataWriter.java:342)
                                             at com.b.a.c.aa.a(SessionDataWriter.java:321)
                                             at com.b.a.c.aa.a(SessionDataWriter.java:241)
                                             at com.b.a.c.aa.a(SessionDataWriter.java:213)
                                             at com.b.a.c.aa.a(SessionDataWriter.java:201)
                                             at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                             at a.a.a.a.a.b.n$1$1.a(ExecutorUtils.java:75)
                                             at a.a.a.a.a.b.h.run(BackgroundPriorityRunnable.java:30)
                                             at java.lang.Thread.run(Thread.java:818)
                                          Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left on device)
                                             at libcore.io.Posix.writeBytes(Native Method)
                                             at libcore.io.Posix.write(Posix.java:271)
                                             at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
                                             at libcore.io.IoBridge.write(IoBridge.java:493)
                                             at java.io.FileOutputStream.write(FileOutputStream.java:186) 
                                             at com.b.a.c.f.c(CodedOutputStream.java:668) 
                                             at com.b.a.c.f.a(CodedOutputStream.java:794) 
                                             at com.b.a.c.f.c(CodedOutputStream.java:740) 
                                             at com.b.a.c.f.a(CodedOutputStream.java:325) 
                                             at com.b.a.c.f.a(CodedOutputStream.java:204) 
                                             at com.b.a.c.aa.a(SessionDataWriter.java:342) 
                                             at com.b.a.c.aa.a(SessionDataWriter.java:321) 
                                             at com.b.a.c.aa.a(SessionDataWriter.java:241) 
                                             at com.b.a.c.aa.a(SessionDataWriter.java:213) 
                                             at com.b.a.c.aa.a(SessionDataWriter.java:201) 
                                             at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                             at a.a.a.a.a.b.n$1$1.a(ExecutorUtils.java:75) 
                                             at a.a.a.a.a.b.h.run(BackgroundPriorityRunnable.java:30) 
                                             at java.lang.Thread.run(Thread.java:818) 
08-09 18:55:19.371 27490-27540 E/Fabric: Failed to flush to session begin file.
                                         java.io.IOException: write failed: ENOSPC (No space left on device)
                                             at libcore.io.IoBridge.write(IoBridge.java:498)
                                             at java.io.FileOutputStream.write(FileOutputStream.java:186)
                                             at com.b.a.c.f.c(CodedOutputStream.java:668)
                                             at com.b.a.c.f.flush(CodedOutputStream.java:678)
                                             at a.a.a.a.a.b.i.a(CommonUtils.java:768)
                                             at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                             at a.a.a.a.a.b.n$1$1.a(ExecutorUtils.java:75)
                                             at a.a.a.a.a.b.h.run(BackgroundPriorityRunnable.java:30)
                                             at java.lang.Thread.run(Thread.java:818)
                                          Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left on device)
                                             at libcore.io.Posix.writeBytes(Native Method)
                                             at libcore.io.Posix.write(Posix.java:271)
                                             at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
                                             at libcore.io.IoBridge.write(IoBridge.java:493)
                                             at java.io.FileOutputStream.write(FileOutputStream.java:186) 
                                             at com.b.a.c.f.c(CodedOutputStream.java:668) 
                                             at com.b.a.c.f.flush(CodedOutputStream.java:678) 
                                             at a.a.a.a.a.b.i.a(CommonUtils.java:768) 
                                             at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                             at a.a.a.a.a.b.n$1$1.a(ExecutorUtils.java:75) 
                                             at a.a.a.a.a.b.h.run(BackgroundPriorityRunnable.java:30) 
                                             at java.lang.Thread.run(Thread.java:818) 
08-09 18:55:19.398 27490-27540 E/Fabric: Error flushing session file stream
                                         java.io.IOException: write failed: ENOSPC (No space left on device)
                                             at libcore.io.IoBridge.write(IoBridge.java:498)
                                             at java.io.FileOutputStream.write(FileOutputStream.java:186)
                                             at com.b.a.c.f.c(CodedOutputStream.java:668)
                                             at com.b.a.c.f.flush(CodedOutputStream.java:678)
                                             at a.a.a.a.a.b.i.a(CommonUtils.java:768)
                                             at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                             at a.a.a.a.a.b.n$1$1.a(ExecutorUtils.java:75)
                                             at a.a.a.a.a.b.h.run(BackgroundPriorityRunnable.java:30)
                                             at java.lang.Thread.run(Thread.java:818)
                                          Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left on device)
                                             at libcore.io.Posix.writeBytes(Native Method)
                                             at libcore.io.Posix.write(Posix.java:271)
                                             at libcore.io.BlockGuardOs.write(BlockGuardOs.java:313)
                                             at libcore.io.IoBridge.write(IoBridge.java:493)
                                             at java.io.FileOutputStream.write(FileOutputStream.java:186) 
                                             at com.b.a.c.f.c(CodedOutputStream.java:668) 
                                             at com.b.a.c.f.flush(CodedOutputStream.java:678) 
                                             at a.a.a.a.a.b.i.a(CommonUtils.java:768) 
                                             at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
                                             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                             at a.a.a.a.a.b.n$1$1.a(ExecutorUtils.java:75) 
                                             at a.a.a.a.a.b.h.run(BackgroundPriorityRunnable.java:30) 
                                             at java.lang.Thread.run(Thread.java:818) 
08-09 18:55:19.455 27490-27490 E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: my.package.name, PID: 27490
                                                 com.couchbase.lite.internal.database.sqlite.exception.SQLiteException: cannot rollback - no transaction is active (code 1)
                                                     at com.couchbase.lite.internal.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
                                                     at com.couchbase.lite.internal.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:481)
                                                     at com.couchbase.lite.internal.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:446)
                                                     at com.couchbase.lite.internal.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:408)
                                                     at com.couchbase.lite.internal.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:515)
                                                     at com.couchbase.lite.storage.SQLiteStorageEngineBase.endTransaction(SQLiteStorageEngineBase.java:144)
                                                     at com.couchbase.lite.store.SQLiteStore.endTransaction(SQLiteStore.java:2142)
                                                     at com.couchbase.lite.store.SQLiteStore.compact(SQLiteStore.java:655)
                                                     at com.couchbase.lite.Database.compact(Database.java:248)
                                                     at [Some class]
08-09 18:55:19.694 27490-27490 I/Process: Sending signal. PID: 27490 SIG: 9

During the compaction the application data grew from 1,1GB to more than 2,25GB… Any idea how to fix this or what could be the issue?

Thanks!

Please file an issue on Github against couchbase/couchbase-lite-java-core.