Support » Plugin: Redis Object Cache » Redis server went away

  • Resolved jordanmc

    (@jordanmc)


    I am not able to connect to my remote Redis host via WordPress dashboard. Diagnostics are at the bottom which shows my config values.

    Do I need to install redis on my WordPress server even though I am connecting to a remote Redis server?

    I am able to connect to my remote Redis host via redis-cli on my WordPress server via SSH.

    Here is the diagnostics:
    Status: Not connected
    Client: PhpRedis (v3.1.2)
    Drop-in: Valid
    Disabled: No
    Filesystem: Working
    Ping:
    Connection Exception: Redis server went away (RedisException)
    Errors: [
    “Redis server went away”
    ]
    PhpRedis: 3.1.2
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.2.13
    Plugin Version: 2.0.13
    Redis Version: Unknown
    Multisite: No
    Global Prefix: “wp_”
    Blog Prefix: “wp_”
    WP_REDIS_CLIENT: “pecl”
    WP_REDIS_SCHEME: “tls”
    WP_REDIS_HOST: “blog.redis.cache.windows.net”
    WP_REDIS_PORT: “6380”
    WP_REDIS_DATABASE: “0”
    WP_REDIS_PREFIX: “ambassador-blog”
    WP_CACHE_KEY_SALT: “ambassador-blog”
    WP_REDIS_PASSWORD: ••••••••
    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”
    ]
    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: [
    “Redis Object Cache Drop-In v2.0.13 by Till Krüss”
    ]

Viewing 8 replies - 1 through 8 (of 8 total)
  • PHP errors below. Says name cannot resolve which is interesting to me since I can connect via this command:

    redis-cli -h blog.redis.cache.windows.net -p 6380 -a password

    #8 {main}
    [07-Sep-2020 17:37:20 UTC] PHP Warning: Redis::connect(): php_network_getaddresses: getaddrinfo failed: Name does not resolve in /home/site/wwwroot/wp-content/object-cache.php on line 574
    [07-Sep-2020 17:37:20 UTC] PHP Warning: Redis::connect(): connect() failed: php_network_getaddresses: getaddrinfo failed: Name does not resolve in /home/site/wwwroot/wp-content/object-cache.php on line 574
    [07-Sep-2020 17:37:20 UTC] RedisException: Redis server went away in /home/site/wwwroot/wp-content/object-cache.php:578
    Stack trace:

    Plugin Author Till Krüss

    (@tillkruess)

    That usually means your PHP-FPM process can’t connect to the server, but your computer can. Firewall?

    I haven’t tried to connect to Redis from my computer.

    I was connecting to my redis server from the WordPress server via redis-cli.

    My diagnostics output isn’t showing anything more but here is the full output again.
    I tried updating PhpRedis but it does not appear to be showing any updated version. Not sure if that would help anyway.

    There is a firewall but it isn’t blocking anything right now and I can connect via SSH from the WP Server.

    Status: Not connected
    Client: PhpRedis (v3.1.2)
    Drop-in: Valid
    Disabled: No
    Filesystem: Working
    Ping:
    Connection Exception: Redis server went away (RedisException)
    Errors: [
    “Redis server went away”
    ]
    PhpRedis: 3.1.2
    Predis: Not loaded
    Credis: Not loaded
    PHP Version: 7.2.13
    Plugin Version: 2.0.13
    Redis Version: Unknown
    Multisite: No
    Global Prefix: “wp_”
    Blog Prefix: “wp_”
    WP_REDIS_CLIENT: “pecl”
    WP_REDIS_SCHEME: “tls”
    WP_REDIS_HOST: “blog.redis.cache.windows.net”
    WP_REDIS_PORT: “6380”
    WP_REDIS_DATABASE: “0”
    WP_REDIS_PREFIX: “wordpressheadless.azurewebsites.net”
    WP_CACHE_KEY_SALT: “wordpressheadless.azurewebsites.net”
    WP_REDIS_PASSWORD: ••••••••
    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”
    ]
    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: [
    “Redis Object Cache Drop-In v2.0.13 by Till Krüss”
    ]

    Plugin Author Till Krüss

    (@tillkruess)

    Oh. You’re trying to connect via TLS which was added in PhpRedis 5.1 I believe. You need to update PhpRedis 👍🏻

    For now, I am just got to use the local server. I tried to update PhpRedis but it didn’t work and I am not familiar with Linux itself as I had used a Docker container that contained WP, etc.

    Plugin Author Till Krüss

    (@tillkruess)

    You can try using Predis instead, it supports TLS.

    Wouldn’t using the local WP server actually be faster? Or is it better to use a remote server? I have a Redis server in Azure I can use.

    Thanks

    Plugin Author Till Krüss

    (@tillkruess)

    Yes, local instances can be faster if your machine has enough memory, but your web server and Redis are sharing the CPU which will be the bottleneck with enough traffic.

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