Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter timmepfeife

    (@timmepfeife)

    Somehow It didn’t post the results. When I remove the WP_REDIS_* constants, it connects to the local Redis instance.

    Status: Verbunden
    Client: PhpRedis (v5.3.7)
    Drop-in: Valid
    Disabled: No
    Ping: 1
    Errors: []
    PhpRedis: 5.3.7
    Relay: Not loaded
    Predis: 2.1.2
    Credis: Not loaded
    PHP Version: 7.4.33
    Plugin Version: 2.4.1
    Redis Version: 5.0.7
    Multisite: No
    Metrics: Enabled
    Metrics recorded: 1728
    Filesystem: Working
    Global Prefix: "wp_"
    Blog Prefix: "wp_"
    WP_REDIS_PLUGIN_PATH: "/srv/www/thehoneyfactory.de/releases/20230530192030/web/app/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",
        "code_snippets",
        "woo_variation_swatches"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes",
        "theme_json",
        "wordfence",
        "wordfence-ls"
    ]
    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",
        "theme_json": "ignored",
        "code_snippets": "global",
        "wordfence": "ignored",
        "wordfence-ls": "ignored",
        "woo_variation_swatches": "global"
    }
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.4.1 by Till Krüss"
    ]
    Thread Starter timmepfeife

    (@timmepfeife)

    I tried now with dev-main and WP_REDIS_CLIENT=predis but the whole deployment fails with the following error. When I use WP_REDIS_CLIENT=phpredis the deployment is working and only the UI shows Redis is unreachable: SELECT failed: NOAUTH Authentication required.

    TASK [deploy : WordPress Installed?] *******************************************System info:  Ansible 2.10.13; Darwin  Trellis 1.8.0: February 12th, 2021---------------------------------------------------non-zero return codeWarning: strlen() expects parameter 1 to be string, array given in/srv/www/thehoneyfactory.de/releases/20230529121803/web/app/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php on line 167Error: Error establishing a Redis connection. SELECTfailed: NOAUTHAuthentication required. [tls://vultr-prod-94868907-dd75-4b5b-9cac-646fa266172a-vultr-prod-3165.vultrdb.com:16752]fatal: [95.179.249.155]: FAILED! => {"changed": false, "cmd": ["wp", "core", "is-installed", "--skip-plugins", "--skip-themes", "--require=/srv/www/thehoneyfactory.de/shared/tmp_multisite_constants.php"], "delta": "0:00:00.252447", "end": "2023-05-29 12:18:38.519604", "failed_when_result": true, "rc": 1, "start": "2023-05-29 12:18:38.267157", "stderr_lines": ["Warning: strlen() expects parameter 1 to be string, array given in /srv/www/thehoneyfactory.de/releases/20230529121803/web/app/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php on line 167", "Error: Error establishing a Redis connection. SELECTfailed: NOAUTH Authentication required. [tls://vultr-prod-94868907-dd75-4b5b-9cac-646fa266172a-vultr-prod-3165.vultrdb.com:16752]"], "stdout": "", "stdout_lines": []}
    Thread Starter timmepfeife

    (@timmepfeife)

    Hi, I installed dev-main, but I still get the error: Redis is unreachable: SELECT failed: NOAUTH Authentication required. [tls://vultr-prod.vultrdb.com:16752]

    I keep it enabled and watch if we still have issues.

    Status: Verbunden
    Client: PhpRedis (v5.3.7)
    Drop-in: Valid
    Disabled: No
    Ping: 1
    Errors: []
    PhpRedis: 5.3.7
    Relay: Not loaded
    Predis: 2.1.2
    Credis: Not loaded
    PHP Version: 7.4.33
    Plugin Version: 2.4.1
    Redis Version: 7.0.11
    Multisite: No
    Metrics: Enabled
    Metrics recorded: 2001
    Filesystem: Working
    Global Prefix: "wp_"
    Blog Prefix: "wp_"
    WP_REDIS_DISABLED: false
    WP_REDIS_CLIENT: "phpredis"
    WP_REDIS_SCHEME: "tls"
    WP_REDIS_SSL_CONTEXT: {
        "verify_peer": false,
        "verify_peer_name": false
    }
    WP_REDIS_HOST: "vultr-prod-.vultrdb.com"
    WP_REDIS_PORT: 16752
    WP_REDIS_DATABASE: 0
    WP_REDIS_PREFIX: "thehoneyfactory_de_production"
    WP_REDIS_PLUGIN_PATH: "/srv/www/thehoneyfactory.de/releases/20230528124723/web/app/plugins/redis-cache"
    WP_REDIS_PASSWORD: ["my-user","••••••••"]
    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",
        "code_snippets",
        "woo_variation_swatches"
    ]
    Ignored Groups: [
        "counts",
        "plugins",
        "themes",
        "theme_json",
        "wordfence",
        "wordfence-ls"
    ]
    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",
        "theme_json": "ignored",
        "code_snippets": "global",
        "wordfence": "ignored",
        "wordfence-ls": "ignored",
        "woo_variation_swatches": "global"
    }
    Drop-ins: [
        "advanced-cache.php v by ",
        "Redis Object Cache Drop-In v2.4.1 by Till Krüss"
    ]
    • This reply was modified 2 years, 10 months ago by timmepfeife.
    Thread Starter timmepfeife

    (@timmepfeife)

    So, I wanted to try it out on our staging system, but there I got the following error. I can’t even access your status page. The only difference between staging and production is the PHP version right now. Staging is already running on php8, while production is still on 7.4.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress-Version 6.2
    Aktives Theme: WordPress Child Theme Atomion (Version 1.0)
    Aktuelles Plugin: Redis Object Cache (Version 2.4.1)
    PHP-Version 8.0.26
    
    Fehler-Details
    ==============
    Ein Fehler vom Typ E_ERROR wurde in der Zeile 167 der Datei /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php verursacht. Fehlermeldung: Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php:167
    Stack trace:
    #0 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php(167): strlen(Array)
    #1 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/dependencies/predis/predis/src/Connection/Factory.php(100): Predis\Connection\Factory->prepareConnection(Object(Predis\Connection\StreamConnection))
    #2 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/dependencies/predis/predis/src/Client.php(127): Predis\Connection\Factory->create(Object(Predis\Connection\Parameters))
    #3 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/dependencies/predis/predis/src/Client.php(68): Predis\Client::createConnection(Object(Predis\Configuration\Options), Array)
    #4 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/includes/class-predis.php(119): Predis\Client->__construct(Array, Array)
    #5 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/includes/class-plugin.php(592): Rhubarb\RedisCache\Predis->connect()
    #6 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/includes/ui/tabs/overview.php(16): Rhubarb\RedisCache\Plugin->check_redis_connection()
    #7 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/includes/ui/class-tab.php(167): include('/srv/www/stagin...')
    #8 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/includes/ui/settings.php(59): Rhubarb\RedisCache\UI\Tab->display()
    #9 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/app/plugins/redis-cache/includes/class-plugin.php(202): require_once('/srv/www/stagin...')
    #10 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/wp/wp-includes/class-wp-hook.php(308): Rhubarb\RedisCache\Plugin->show_admin_page('')
    #11 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/wp/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #12 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/wp/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #13 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/wp/wp-admin/admin.php(259): do_action('settings_page_r...')
    #14 /srv/www/staging.thehoneyfactory.de/releases/20230515070854/web/wp/wp-admin/options-general.php(10): require_once('/srv/www/stagin...')
    #15 {main}
    thrown

    Somehow, it still tries to use predis instead of phpredis. I’m going to enable it on production when we don’t have that much traffic, so I can send you the logs.

    Status: Not enabled
    Client: phpredis
    Drop-in: Not installed
    Disabled: No
    PhpRedis: 5.3.7
    Relay: Not loaded
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 8.0.26
    Plugin Version: 2.4.1
    Redis Version: Unknown
    Multisite: No
    Metrics: Disabled
    Metrics recorded: 0
    Filesystem: Working
    WP_REDIS_DISABLED: false
    WP_REDIS_CLIENT: "phpredis"
    WP_REDIS_SCHEME: "tls"
    WP_REDIS_SSL_CONTEXT: {
        "verify_peer": false,
        "verify_peer_name": false
    }
    WP_REDIS_HOST: "vultr-prod.vultrdb.com"
    WP_REDIS_PORT: 16752
    WP_REDIS_DATABASE: 1
    WP_REDIS_PREFIX: "suf_thehoneyfactory_stage"
    WP_REDIS_PLUGIN_PATH: "/srv/www/staging.thehoneyfactory.de/releases/20230520130646/web/app/plugins/redis-cache"
    WP_REDIS_PASSWORD: ["my-user","••••••••"]
    Drop-ins: [
        "advanced-cache.php v by "
    ]
    Thread Starter timmepfeife

    (@timmepfeife)

    Thanks for the hint, I will try this out on our staging system. Sadly, setting WP_REDIS_CLIENT=phpredis didn’t change anything.

    Thread Starter timmepfeife

    (@timmepfeife)

    Thanks for your fast reply!

    Is this still happening? You may need to set WP_REDIS_CLIENT=phpredis to use a username to connect.

    I will try that out.

    That means your Redis Server isn’t available and I’d suggest asking your host for assistance. Might be running out of CPU, or connections.

    That’s definitely not the case. The Redis server is bored, we have 10 to 30% CPU usage on average.

    This plugin is not the issue, it’s just providing WordPress with wp_cache_*() functions for persistent caching. I doubt it’s Woo itself, but probably Woo plugin.

    The function is not the issue because it’s working fine for the last year. It’s the Redis timeout, which is happening randomly since upgrading to the latest version.

    I’m going to test the WP_REDIS_CLIENT=phpredis config. I’m actually quite positive that this will resolve the issues.

Viewing 6 replies - 1 through 6 (of 6 total)