Quantcast
Channel: Mobile - Couchbase Forums
Viewing all articles
Browse latest Browse all 1117

2.6 CBLite SQlite file size keeps growing

$
0
0

@Matteo_Spreafico wrote:

Hi, we have a database with about 150.000 documents, growing every week by 5k docs. We set( via the NODE.js SDK) an expire date to 1 week for every docoument to keep the iOS Client clean and fast.

We are correctly receiving the expired docs via replication but, even thought we correctly purge, compact and close the db, the SQLite database keeps growing. Now it’s over 140mb resulting in a ridicolously bad performance when querying on older devices (like ipad mini 2).

Any ideas?
We also tried manually deleting and purging docs manually, but the SQLIte db doesnt shrink in size.

Thank you.

TL;DR
Documents are set to expire on server ( VIA NOD JS) but the Client (IOS, SWIFT, CBL 2.6) doesnt delete them from disk even tho purge and compact are called. The result is a Sqlite file size that keeps sky rocketing resulting in poor performance.

Here a quick test I did

SQlite file size before compacting using the couchbaselite function -> 149590016
SQlite file size after compacting using the couchbaselite db.compact() function -> 149590016 (DID NOTHING)
SQlite file size after compacting using the couchbaselite db.close() function -> 144949248
=== === === === manually purged documents === === === === ===
SQlite file size before compacting using the couchbaselite function -> ** 149126768**
SQlite file size after compacting using the couchbaselite db.compact() function -> ** 149126768** (DID NOTHING)
SQlite file size after compacting using the couchbaselite db.close() function -> ** 144949248**
SQlite file size after compacting using SQLITE Studio -> ** 119234239**

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1117

Trending Articles