SQLite Forum

WAL journal file-size keeps on growing...
Login
After doing some more tests:

I tried both **PRAGMA journal_size_limit** and the **SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT** build-flag.<br>
Both worked the same.
Using the build-flag I set max file-size to 10 MB (10485760 bytes).

The behavior is like so:<br>

When I run my high-stress test, the journal file-size climb up with no boundary, reaching ~1.5GB before test terminated. <br>
When test terminated the file disappears.<br>
I will mention that the underlying database size AFTER ALL UPDATES is ~6MB.

If I introduce **occasional sleep** in my test threads then file-size goes up and down between  ~50MB and 10MB (my max-size limit).<br>
This shows that the occasional checkpoints do work when they can.

When stress terminated **and before connections are closed** I inserted ~1 minute sleep.<br>
During this time file-size remained on 10MB so I assume that during my real program lifetime it will stay on this size...