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

    (@olliejones)

    You can try reducing the size of the cache on the settings page. It’s possible the cache grows too large and then something goes wrong on your server machine.

    Take a look at the end of …/wp-content/debug.log . If you see some error messages related to the object cache there, please reply to this topic and let me know what they say.

    Thanks for your patience.

    • This reply was modified 1 year, 10 months ago by OllieJones.
    Thread Starter udithadil

    (@udithadil)

    Thank you for your kind reply. Here I mention the error log related to the object cache.

    [04-May-2023 02:16:09 UTC] SQLite Object Cache: handle_put database is locked (5) Unable to execute statement: database is locked (0) #0 /home/pastpapers.wiki/public_html/wp-content/object-cache.php(1437): SQLite3Stmt->execute()
    
    #1 /home/pastpapers.wiki/public_html/wp-content/object-cache.php(1410): WP_Object_Cache->put_by_name()
    
    #2 /home/pastpapers.wiki/public_html/wp-content/object-cache.php(1239): WP_Object_Cache->set()
    
    #3 /home/pastpapers.wiki/public_html/wp-content/object-cache.php(1197): WP_Object_Cache->add()
    
    #4 /home/pastpapers.wiki/public_html/wp-content/object-cache.php(2270): WP_Object_Cache->add_multiple()
    
    #5 /home/pastpapers.wiki/public_html/wp-includes/post.php(7297): wp_cache_add_multiple()
    
    #6 /home/pastpapers.wiki/public_html/wp-includes/post.php(7377): update_post_cache()
    
    #7 /home/pastpapers.wiki/public_html/wp-includes/class-wp-query.php(3517): update_post_caches()
    
    #8 /home/pastpapers.wiki/public_html/wp-includes/class-wp-query.php(3787): WP_Query->get_posts()
    
    #9 /home/pastpapers.wiki/public_html/wp-includes/class-wp.php(663): WP_Query->query()
    
    #10 /home/pastpapers.wiki/public_html/wp-includes/class-wp.php(783): WP->query_posts()
    
    #11 /home/pastpapers.wiki/public_html/wp-includes/functions.php(1334): WP->main()
    
    #12 /home/pastpapers.wiki/public_html/wp-blog-header.php(16): wp()
    
    #13 /home/pastpapers.wiki/public_html/index.php(17): require('...')
    
    #14 {main}
    
    [04-May-2023 02:16:09 UTC] sqlite_object_cache failure, deleting sqlite files to retry. 0
    

    Here I mention my current settings for the plugin.
    https://drive.google.com/drive/folders/1edSS7Zc7Fn4Vruf9ochdNrk1zLZv8U51?usp=sharing

    Please give me a solution to the above problem.

    Plugin Author OllieJones

    (@olliejones)

    Aha! Database timeout on SQLite! This can come from a few things.

    1. 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.
    2. 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.
    3. 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.
    Plugin Author OllieJones

    (@olliejones)

    I added to the above entry ^^^ by editing it to add a new suggestion no 1. This is hopefully make sure you get notified.

    Plugin Author OllieJones

    (@olliejones)

    I’m planning a way to fix this problem, in the next release. Again, I’m grateful for your bug report.

    https://github.com/OllieJones/sqlite-object-cache/issues/31

    Thread Starter udithadil

    (@udithadil)

    Thank you very much. It’s a great help. I’ll update if something goes wrong after the next release.

    Thank you!

    Plugin Author OllieJones

    (@olliejones)

    V1.3.1 is out. It should avoid letting the cache file get bloated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘The SQLite Object Cache temporarily failed. Please try again now.’ is closed to new replies.