Aha! Database timeout on SQLite! This can come from a few things.
- You have set a maximum size on your cache of 4Mib, the default. Yet your cache has, in your stats display, reached a size of 33MiB. The cache cleanup uses an hourly WP_Cron job to purge out the oldest items, but that’s not happening it seems. If you are using an external cron job, please make sure it invokes WP_Cron at least hourly.
- The SQLite disk file must be on local storage, not a remote drive (via NFS or CIFS or some other remote filesystem scheme). SQLite serves as a shared cache between the php processes in your server by making really good use of file synchronization of extfs4 (and NTFSs if the server is on Windows). That synchronization isn’t available on remote filesystems. So, it’s gotta be local. A lot of people put it on
/tmp
. Please read this.
- Some php request handler (pageview, REST) for your site takes more than 5000 milliseconds to save something to the cache, so the next one that wants to save something times out. It’s possible this is a long-delayed purge-old-entries job.
You can increase the timeout. For example, if you put this line in your wp-config.php
file you will increase the timeout to 20,000 milliseconds (20 seconds).
define( 'WP_SQLITE_OBJECT_CACHE_TIMEOUT', 20000);
I suggest you consider my suggestions 1 and 2 first, and only then consider 3. A long wait in this operation probably means some kind of deep slowdown or deadlock in some other part of WordPress, and increasing the timeout may just mask the real problem.
Please let me know how you fare with your problem. And thanks again for your patience.
-
This reply was modified 1 year, 10 months ago by
OllieJones.