Thanks for letting me know about this WAL-file bloat.
It can happen on very active web sites where the web server never gets a moment where it isn’t processing some page view or other. I try to mitigate it by randomly doing a checkpoint operation at this code. With a probability of 0.002 I force it. I picked that 0.002 number out of thin air hoping it would be adequate. ( I guess it wasn’t in your case, sorry about that).
I could have done the checkpoint operation every so many page views, but I don’t. I use probability here rather than some sort of page view count because I want to avoid any unnecessary writing to either the object cache or the database. The WAL only gets extended if something writes to the cache.
You could, from a shell, mitigate this problem by doing this command
sqlite3 .ht.object-cache.sqlite 'PRAGMA wal_checkpoint(RESTART)'
It locks the database, scans the WAL file, and puts its contents back into the .sqlite file. Please be sure to run the sqlite3 command with the same effective user and group as your web server.
I’ll try to dream up a way of making this problem less likely.
Thanks for the quick response. I am no coder so won’t be able to help with an idea on the WAL issue unfortunately! But can’t you use the action scheduler?
Thanks again.