• Resolved Jay Kavanagh

    (@designstack)


    Hi there,

    Great plugin which I use on most websites! I did have an issue today where a file “.ht.object-cache.sqlite-wal” grew to 148GB in size and it took me a while to figure out what was happening. Is there any way of adding a limit to these files?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author OllieJones

    (@olliejones)

    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.

    Thread Starter Jay Kavanagh

    (@designstack)

    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.

    Plugin Author OllieJones

    (@olliejones)

    Plugin Author OllieJones

    (@olliejones)

    Please try 1.6.2.

    Thread Starter Jay Kavanagh

    (@designstack)

    Will do, thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.