Support » Plugin: Redis Object Cache » Redis Server not connected with WP 5.5

  • Resolved SYNC4489

    (@sync4489)


    Hi,

    I’m using this nice plugin since years and had very few troubles with it.
    But now a strange thing is happening:
    All websites updated to WordPress 5.5/5.5.1 cannot connect anymore to the Redis Server.
    Any other website on same server still on WP 5.4.2 or lower works flawlessly…

    here’s a working diagnostics on WP 5.4.2:

    Status: Connected
    Client: PhpRedis (v5.0.2)
    Drop-in: Valid
    Disabled: No
    Filesystem: Working
    Ping: 1
    Errors: []
    PhpRedis: 5.0.2
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.3.21
    Plugin Version: 2.0.13
    Redis Version: 3.2.12
    Multisite: No
    Global Prefix: "wp1g_"
    Blog Prefix: "wp1g_"
    WP_REDIS_PREFIX: "*****"
    WP_CACHE_KEY_SALT: "*****"
    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"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes"
    ]
    Unflushable Groups: []
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.0.13 by Till Krüss"
    ]
    

    and here’s a non-working one on WP 5.5.1 (same server, same cpanel account)

    Status: Not connected
    Client: PhpRedis (v5.0.2)
    Drop-in: Valid
    Disabled: No
    Filesystem: Working
    Ping: 1
    Errors: [
        "socket error on read socket"
    ]
    PhpRedis: 5.0.2
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.3.21
    Plugin Version: 2.0.13
    Redis Version: 3.2.12
    Multisite: No
    Global Prefix: "wplu_"
    Blog Prefix: "wplu_"
    WP_REDIS_PREFIX: "*****"
    WP_CACHE_KEY_SALT: "*****"
    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"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes",
        "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"
    ]
    Unflushable Groups: []
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.0.13 by Till Krüss"
    ]
    

    Any advice?
    Thanks in advance!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Sounds like your Redis server isn’t responding. I’d try a full server restart.

    SYNC4489

    (@sync4489)

    hmmm doesn’t seem to be the problem, as I can connect to the server with redis-cli, but even more important all other sites, on same server and still not updated to WP 5.5, do not have the problem as you can see by the plugin diagnostics I’ve posted above.

    Plugin Author Till Krüss

    (@tillkruess)

    Please post your WP_REDIS_* constants from your config.

    SYNC4489

    (@sync4489)

    these are from a working website (WP 5.4):

    WP_REDIS_PREFIX: “wwwgorminacom”
    WP_CACHE_KEY_SALT: “wwwgorminacom”

    —-

    these are from a non-working website (WP 5.5):

    WP_REDIS_PREFIX: “moggiesdoggiescom”
    WP_CACHE_KEY_SALT: “moggiesdoggiescom”

    or another one (WP 5.5)

    WP_REDIS_PREFIX: “wwwhotelbelvederefortedeimarmicom”
    WP_CACHE_KEY_SALT: “wwwhotelbelvederefortedeimarmicom”

    etc. etc. I have tens of customer websites and the only ‘not connected’ errors come from those who got updated to 5.5

    Plugin Author Till Krüss

    (@tillkruess)

    I’d try to set a dedicated WP_REDIS_HOST and WP_REDIS_PORT to ensure the connection is explicit: https://github.com/rhubarbgroup/redis-cache/wiki

    It’s not a WP 5.5 error, it has to be at the PHP-FPM level of your server. Maybe Opcode-cache.

    SYNC4489

    (@sync4489)

    nothing…

    I’ve just tried to update the wp-config.php as you suggested, the modifications are seen by the plugin as you can see by the copy paste from diagnostics below:

    WP_REDIS_HOST: "127.0.0.1"
    WP_REDIS_PORT: 6379
    WP_REDIS_DATABASE: 0
    WP_REDIS_PREFIX: "moggiesdoggiescom"
    WP_CACHE_KEY_SALT: "moggiesdoggiescom"
    

    I’ve even restarted the php-fpm service just to be sure, but the ‘not connected’ error persists.
    But as I said, only for the wp 5.5, these websites are from the same server and the same cpanel/php-fpm account.

    Plugin Author Till Krüss

    (@tillkruess)

    Can you post your error log?

    SYNC4489

    (@sync4489)

    Hi again 🙂

    found the culprit, it’s the Envato market plugin that throws an error on WP 5.5 and your plugin:

    this is the error log when I click on diagnostics in the Redis plugin settings page:

    RedisException: socket error on read socket in /wp-content/object-cache.php:1260
    Stack trace:
    #0 ************/wp-content/object-cache.php(1260): Redis->eval('redis.replicate...')
    #1 ************/wp-content/object-cache.php(1131): WP_Object_Cache->{closure}()
    #2 ************/wp-content/object-cache.php(94): WP_Object_Cache->flush(0)
    #3 ************/wp-content/plugins/envato-market/inc/class-envato-market-items.php(194): wp_cache_flush()
    #4 ************/wp-content/plugins/envato-market/inc/class-envato-market-items.php(302): Envato_Market_Items->wp_plugins()
    #5 ************/wp-includes/class-wp-hook.php(289): Envato_Market_Items->update_plugins(Object(stdClass))
    #6 ************/wp-includes/plugin.php(206): WP_Hook->apply_filters(Object(stdClass), Array)
    #7 ************/wp-includes/option.php(1930): apply_filters('pre_set_site_tr...', Object(stdClass), 'update_plugins')
    #8 ************/wp-includes/update.php(347): set_site_transient('update_plugins', Object(stdClass))
    #9 ************/wp-includes/update.php(813): wp_update_plugins()
    #10 ************/wp-includes/class-wp-hook.php(287): _maybe_update_plugins('')
    #11 ************/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #12 ************/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #13 ************/wp-admin/admin.php(175): do_action('admin_init')
    #14 ************/wp-admin/options-general.php(10): require_once('/****/****/p...')
    #15 {main}

    Once I deactivated the Envato plugin, the redis connection worked flawlessly

    Hope this helps

    Plugin Author Till Krüss

    (@tillkruess)

    Glad it’s resolved 👍🏻

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.