• Resolved cnxsoft

    (@cnxsoft)


    I’ve been using Redis Object Cache for several years, and in recent days, I’ve noticed a Redis connection error when publishing a post only. It works otherwise, and the issue happens on two website hosted on different servers.

    Here’s the log from once the website that shows everything looks to be normal.

    Status: Connected
    Client: PhpRedis (v6.0.2)
    Drop-in: Valid
    Disabled: No
    Ping: 1
    Errors: []
    PhpRedis: 6.0.2
    Relay: Not loaded
    Predis: 2.1.2
    Credis: Not loaded
    PHP Version: 8.2.15
    Plugin Version: 2.5.0
    Redis Version: 5.0.7
    Multisite: No
    Metrics: Enabled
    Metrics recorded: 11863
    Filesystem: Writable
    Global Prefix: "edited_"
    Blog Prefix: "edited_"
    WP_REDIS_PREFIX: "www.cnx-software.com"
    WP_CACHE_KEY_SALT: "edited"
    WP_REDIS_PLUGIN_PATH: "/edited/public_html/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",
        "network-queries",
        "site-queries",
        "user-queries"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "theme_json",
        "wordfence",
        "wordfence-ls",
        "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",
        "blog_meta": "global",
        "network-queries": "global",
        "site-queries": "global",
        "user-queries": "global",
        "counts": "ignored",
        "plugins": "ignored",
        "theme_json": "ignored",
        "wordfence": "ignored",
        "wordfence-ls": "ignored",
        "themes": "ignored"
    }
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.5.0 by Till Krüss"
    ]
    
    

    The page I need help with: [log in to see the link]

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

    (@tillkruess)

    Can you post your PHP error logs so we can see what’s going on?

    Thread Starter cnxsoft

    (@cnxsoft)

    I can see several errors like these ones:

    [23-Feb-2024 08:00:32] WARNING: [pool www] child 1394587 said into stderr: "NOTICE: PHP message: RedisException: socket error on read socket in /srv/www/cnx-software.com/public_html/wp-content/object-cache.php:559"
    [23-Feb-2024 08:00:32] WARNING: [pool www] child 1394587 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /srv/www/cnx-software.com/public_html/wp-content/object-cache.php:193"
    [23-Feb-2024 08:00:32] WARNING: [pool www] child 1394638 said into stderr: "NOTICE: PHP message: RedisException: socket error on read socket in /srv/www/cnx-software.com/public_html/wp-content/object-cache.php:559"
    [23-Feb-2024 08:00:32] WARNING: [pool www] child 1394638 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /srv/www/cnx-software.com/public_html/wp-content/object-cache.php:193"
    

    • This reply was modified 1 year ago by cnxsoft.
    guero2099

    (@guero2099)

    I have the same error

    Plugin Author Till Krüss

    (@tillkruess)

    @cnxsoft: Does this happen reliably, as in every time you try to publish a post?

    stevivor

    (@stevivor)

    Exact same problem here, and I can confirm the problem happens each day when publishing a new post. Three days ago, restarting Redis on my server would fix the issue until the next morning (and the first post of the day). Yesterday, the error occured on each post, regardless of restarting Redis on my server.

    Hope that helps?

    • This reply was modified 1 year ago by stevivor. Reason: Just wanted to be notified of replies
    Thread Starter cnxsoft

    (@cnxsoft)

    @tillkruess Yes. It happens each time I try to publish a new post. It may also happen when I edit a post.

    guero2099

    (@guero2099)

    I can confirm that restarting redis on the server fix the issue for a few hours

    Plugin Author Till Krüss

    (@tillkruess)

    @cnxsoft: Does a restart resolve it as well for you?

    Thread Starter cnxsoft

    (@cnxsoft)

    Yes, it does. I’ve just published a post after a restart, and I did not get an error.

    Plugin Author Till Krüss

    (@tillkruess)

    In that case I’d suggest setting up monitoring for Redis Server and keeping and eye on the memory fragmentation ratio.

    guero2099

    (@guero2099)

    The ratio on the monitoring tab on both servers where I have the issue is more than 90%; what should be the correct value for the ratio?

    Plugin Author Till Krüss

    (@tillkruess)

    That’s the cache hit ratio, which won’t tell you much.

    If you’re having trouble with Redis Server itself (and a restart resolving them) then you need to set up dedicated Redis Server monitoring that keeps an eye on CPU usage, memory pressure and your memory fragmentation ratio.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Redis connection error when publishing new post only’ is closed to new replies.