• Resolved ramanm

    (@ramanm)


    Hi WP Redis,
    I have been using your plugin for few years. It is very reliable. Thank you.

    Two questions:
    1. In AWS, I have one shard with 2 nodes — primary and a replica. I see cache hits in the primary, but no cache hits in the replica. This made me think that our site is reading only from the primary node and not from the replica. The AWS documentation mentions: “Redis (cluster mode enabled) clusters, use the cluster’s Configuration Endpoint for all operations. You must use a client that supports Redis Cluster (Redis 3.2). You can still read from individual node endpoints (In the API/CLI these are referred to as Read Endpoints).” We would like the read accesses to be load-balanced between the 2 nodes. It appears that this is not happening. Could you shed some light on this? Does WP-Redis support Redis Cluster as mentioned above?

    2. After some plugin update, we started getting sporadic Connection timeout with the following exception. After this exception, our site appears to become slow. So, I felt maybe after the exception, the wordpress does not recover. For now, I upgraded the redis server thinking maybe the load on the server could be causing the timeout. I have to wait for a day or so to see if that solved the problem. Could you kindly check if this exception is recoverable or anything need to be fixed?
    [10-Jul-2020 20:52:35 UTC] PHP Warning: WP Redis: Connection timed out in wp-content/plugins/wp-redis/object-cache.php on line 1296 [10-Jul-2020 20:52:35 UTC] PHP Notice: Undefined property: WP_Object_Cache::$redis in wp-content/plugins/wp-redis/object-cache.php on line 1031 [10-Jul-2020 20:52:35 UTC] PHP Fatal error: Uncaught Error: Call to a member function auth() on null in /var/www/html/ebs/wordpress/web/wp-content/plugins/wp-redis/object-cache.php:1140 Stack trace: #0 wp-content/plugins/wp-redis/object-cache.php(1031): WP_Object_Cache->perform_client_connection() #1 wp-content/plugins/wp-redis/object-cache.php(1340): WP_Object_Cache->_connect_redis() #2 wp-content/plugins/wp-redis/object-cache.php(162): WP_Object_Cache->__construct() #3 wp-includes/load.php(580): wp_cache_init() #4 wp-settings.php(133): wp_start_object_cache() #5 wp-config.php(131): require_once(‘/var/www/html/e…’) #6 wp-load.php(37): require_once(‘/var/www/html/e…’) #7 wp-admin/admin-ajax.php(22): require_once(‘/var/www/html/e…’) #8 {main} thrown in wp-content/plugins/wp-redis/object-cache.php on line 1140

    Thank you,
    Raman

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hi @ramanm,

    Thanks for the kind words

    We would like the read accesses to be load-balanced between the 2 nodes. It appears that this is not happening. Could you shed some light on this? Does WP-Redis support Redis Cluster as mentioned above?

    I, too, suspect it’s probably not happening. The instantiation of RedisCluster is different than how WP Redis instantiates the Redis client. It is possible to filter the connection, however, so you might be able to get it to work with a little bit of PHP.

    fter some plugin update, we started getting sporadic Connection timeout with the following exception. After this exception, our site appears to become slow. So, I felt maybe after the exception, the wordpress does not recover. For now, I upgraded the redis server thinking maybe the load on the server could be causing the timeout. I have to wait for a day or so to see if that solved the problem. Could you kindly check if this exception is recoverable or anything need to be fixed?

    The connection itself isn’t going to be recoverable because your Redis server is under load. And the slowness, unfortunately, is probably because you no longer have a persistent object cache.

    However, WP Redis shouldn’t be triggering a fatal error either (and I’m surprised it took this long to come up). In this pull request, I’ve improved the connection logic such that a failed connection will fall back to the internal object cache instead of causing a fatal. It will be released in v1.1.0.

    Hope this helps!

    Thread Starter ramanm

    (@ramanm)

    Hi Daniel,

    Thank you very much for the prompt response and for fixing the issue. Because of your response I have a better understanding of the cluster now.

    Thank you,
    Raman

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redis cluster’ is closed to new replies.