Support » Plugin: Redis Object Cache » Page constantly going offline with Redis running

  • Resolved Carsten Lund

    (@carsten-lund)


    Hi there, my page is constantly going offline with Redis running. Any idea why this is happening?

    trying https://muii.dk...
    dns resolved in 50 ms
    established connection in 51 ms
    first byte received in 1111 ms
    finished loading in 1152 ms
    http status code 404!

    Here is the log:

    
    
    Status: Connected
    Client: PhpRedis (v5.3.7)
    Drop-in: Valid
    Disabled: No
    Ping: 1
    Errors: []
    PhpRedis: 5.3.7
    Relay: Not loaded
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 8.0.27
    Plugin Version: 2.2.3
    Redis Version: 7.0.8
    Multisite: No
    Metrics: Enabled
    Metrics recorded: 363
    Filesystem: Working
    Global Prefix: "LFTglLWJpK_"
    Blog Prefix: "LFTglLWJpK_"
    WP_REDIS_PREFIX: "^vDgOn:XlYX1a^Pd-aAV1I{Z,*KF$B;QGkx=dbPfJCX!S|>q!h7peC>aF)]j35,("
    WP_CACHE_KEY_SALT: "^vDgOn:XlYX1a^Pd-aAV1I{Z,*KF$B;QGkx=dbPfJCX!S|>q!h7peC>aF)]j35,("
    WP_REDIS_PLUGIN_PATH: "/var/www/vhosts/muii.dk/httpdocs/wp-content/plugins/redis-cache"
    Global Groups: [
        "blog-details",
        "blog-id-cache",
        "blog-lookup",
        "global-posts",
        "networks",
        "rss",
        "sites",
        "site-details",
        "site-lookup",
        "site-options",
        "site-transient",
        "users",
        "useremail",
        "userlogins",
        "usermeta",
        "user_meta",
        "userslugs",
        "redis-cache",
        "blog_meta",
        "bp_object_terms",
        "bp",
        "bp_pages",
        "bp_invitations",
        "bp_last_activity",
        "bp_member_member_type",
        "bp_xprofile",
        "bp_xprofile_data",
        "bp_xprofile_fields",
        "bp_xprofile_groups",
        "xprofile_meta",
        "bp_user_mid",
        "bp_messages",
        "bp_messages_threads",
        "bp_messages_unread_count",
        "message_meta",
        "bp_notifications",
        "notification_meta",
        "bp_notifications_unread_count",
        "bp_notifications_grouped_notifications"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes"
    ]
    Unflushable Groups: []
    Groups Types: {
        "blog-details": "global",
        "blog-id-cache": "global",
        "blog-lookup": "global",
        "global-posts": "global",
        "networks": "global",
        "rss": "global",
        "sites": "global",
        "site-details": "global",
        "site-lookup": "global",
        "site-options": "global",
        "site-transient": "global",
        "users": "global",
        "useremail": "global",
        "userlogins": "global",
        "usermeta": "global",
        "user_meta": "global",
        "userslugs": "global",
        "redis-cache": "global",
        "counts": "ignored",
        "plugins": "ignored",
        "themes": "ignored",
        "blog_meta": "global",
        "bp_object_terms": "global",
        "bp": "global",
        "bp_pages": "global",
        "bp_invitations": "global",
        "bp_last_activity": "global",
        "bp_member_member_type": "global",
        "bp_xprofile": "global",
        "bp_xprofile_data": "global",
        "bp_xprofile_fields": "global",
        "bp_xprofile_groups": "global",
        "xprofile_meta": "global",
        "bp_user_mid": "global",
        "bp_messages": "global",
        "bp_messages_threads": "global",
        "bp_messages_unread_count": "global",
        "message_meta": "global",
        "bp_notifications": "global",
        "notification_meta": "global",
        "bp_notifications_unread_count": "global",
        "bp_notifications_grouped_notifications": "global"
    }
    Drop-ins: [
        "maintenance.php v by ",
        "Redis Object Cache Drop-In v2.2.3 by Till Krüss"
    ]
    
    
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Carsten Lund

    (@carsten-lund)

    Hi again, I can see that I’m facing exactly the same issue as @arrebarre https://wordpress.org/support/topic/404-error-on-front-page-2/

    But the possible solution in this link is just a bit over my competence, could you please help, explaining what I should do to fix the issue?

    Thanks!

    Improvements to WP_Query performance in 6.1

    Plugin Author Till Krüss

    (@tillkruess)

    By “offline” you mean a 404 error?

    That’s a WordPress core issue.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Yes it’s a 404 error.

    Is this the code I should add to disabling the query cache?

    $args = array(
       'posts_per_page' => 50,
       'cache_results'  => false
    );
    $query = new WP_Query( $args );

    What about this warning?

    Disabling caching like this should only be done in extreme cases. For best performance, it is highly recommended to keep caching enabled and invalidate caches using the clean_post_cache function. 

    Thread Starter Carsten Lund

    (@carsten-lund)

    Sorry I’m not a programmer, but just want to take advantage of object caching on my BuddyPress site.

    Would you be so kind to clarify, if this is the right code to add, and where to add it?

    Thank you.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Turned on WP Rocket together with object cache, and the issue is fixed.

    Plugin Author Till Krüss

    (@tillkruess)

    That’s good to hear.

    You can use this snippet to disable query-caching in WordPress core:

    add_action( 'parse_query', function ( $wp_query ) {
       $wp_query->query_vars['cache_results'] = false;
    } );
    Thread Starter Carsten Lund

    (@carsten-lund)

    Thanks for the snippet, where should I paste it in?

    Will disabling query-caching in WordPress core: have any positive impact on Redis object caching, or why should I disable it?

    thanks

    Plugin Author Till Krüss

    (@tillkruess)

    Ideally in a MUST-USE plugin that you create.

    Thread Starter Carsten Lund

    (@carsten-lund)

    Sorry, I don’t write plugins.

    If disabling query-caching in WordPress core is required in order for Redis to work, why isn’t this mentioned for example in this description?

    What is Redis Object Caching and How to Use It for Your WordPress Site. https://wp-rocket.me/blog/redis-object-caching/

    • This reply was modified 1 year, 1 month ago by Carsten Lund.
    Thread Starter Carsten Lund

    (@carsten-lund)

    The issue with error 404 on frontpage, is back, after a while. I swiched to another object cache plugin, and the error hasn’t showed up yet.

    I’m not the only one who is experiencing this issue, so it seams like a common issue.

    You wrote elswere that WordPress core and Redis Object Cache are 100% compatible, so it can’t be right that you then have to add snippetsfor the plugin to work?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Page constantly going offline with Redis running’ is closed to new replies.