https://wordpress.org/support/topic/max-cache-file-size/
A user had a very large WAL file. It would be good to handle this more aggressively. Maybe change the 1/5000 chance to a larger number, 1/500? Or make it controllable with a wp-config setting?
And add a wp sqlite-object-cache checkpoint command, so this can be done from wp-cli. It will, of course, flush APCu.
Consider a wp_cron task.
Do TRUNCATE instead of restart with lower probability to avoid infinitely growing wal files.