rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
427 stars 149 forks source link

Fatal error from redis-cache #460

Closed zoddshop closed 1 year ago

zoddshop commented 1 year ago

I am constantly getting fatal errors on my wordpress and upon checking the logs I see the following fatal error being spammed constantly

[STDERR] PHP Fatal error: Uncaught RedisException: socket error on read socket in /usr/local/lsws/Example/html/wordpress/wp-content/object-cache.php:561 Stack trace:

0 /usr/local/lsws/Example/html/wordpress/wp-content/object-cache.php(561): Redis->ping()

1 /usr/local/lsws/Example/html/wordpress/wp-content/object-cache.php(256): WP_Object_Cache->__construct()

2 /usr/local/lsws/Example/html/wordpress/wp-includes/load.php(750): wp_cache_init()

3 /usr/local/lsws/Example/html/wordpress/wp-settings.php(131): wp_start_object_cache()

4 /usr/local/lsws/Example/html/wordpress/wp-config.php(110): require_once('...')

5 /usr/local/lsws/Example/html/wordpress/wp-load.php(50): require_once('...')

6 /usr/local/lsws/Example/html/wordpress/wp-blog-header.php(13): require_once('...')

7 /usr/local/lsws/Example/html/wordpress/index.php(17): require('...')

8 {main}

thrown in /usr/local/lsws/Example/html/wordpress/wp-content/object-cache.php on line 561

Here are the relevant lines in object-cache.php if ( defined( 'WP_REDIS_CLUSTER' ) ) { $connectionId = is_string( WP_REDIS_CLUSTER ) ? WP_REDIS_CLUSTER : current( $this->build_cluster_connection_array() );

            $this->diagnostics[ 'ping' ] = $client === 'predis'
                ? $this->redis->getClientBy( 'id', $connectionId )->ping()
                : $this->redis->ping( $connectionId );
        } else {
            $this->diagnostics[ 'ping' ] = $this->redis->ping();
        }

        $this->fetch_info();
tillkruss commented 1 year ago

Check the FAQ: https://github.com/rhubarbgroup/redis-cache/blob/develop/FAQ.md

This is related to your Redis Server, not this plugin.