Error establishing a Redis connection

I usually got this error:

# Error establishing a Redis connection

`read error on connection to 127.0.0.1:6379`

WordPress is unable to establish a connection to Redis. This means that the connection information in your `wp-config.php` file are incorrect, or that the Redis server is not reachable.

* Is the correct Redis host and port set?
* Is the Redis server running?

If you need help, please read the [installation instructions](https://github.com/rhubarbgroup/redis-cache/blob/develop/INSTALL.md).

To disable Redis, delete the `object-cache.php` file in the `/wp-content/` directory.

And when I refresh the browser, it back to normal. Seems, Redis unable to hand much requests and traffic

Please advice.

Thanks

hi did you tried any other plugin like this Redis Object Cache – WordPress plugin | WordPress.org ?

Yes, I am using that plugin and it’s display the above error message

Is it running?
systemctl status redis
How did you install it?

i’ve tested it and it works fine for me.

Hi,

I’ve exactly the same problem : redis is installed and running,
Plugin says :
Status : Not activated*
File system : Writable*
Redis : Reachable*
(* : translated by me)

Diags says :
Client:
Drop-in: Not installed
Disabled: No
PhpRedis: 6.0.2
Relay: Not loaded
Predis: 2.1.2
Credis: Not loaded
PHP Version: 7.4.33
Plugin Version: 2.5.3
Redis Version: Unknown
Multisite: No
Metrics: Disabled
Metrics recorded: 0
Filesystem: Writable
WP_REDIS_HOST: “127.0.0.1”
WP_REDIS_PORT: 6379
WP_REDIS_DATABASE: 0
WP_REDIS_TIMEOUT: 1
WP_REDIS_READ_TIMEOUT: 1
WP_REDIS_PREFIX: “p1g”
WP_REDIS_PLUGIN_PATH: “/var/www/clients/client0/web212/web/wp-content/plugins/redis-cache”
Drop-ins:

but as soon as I activate the plugin, the site stops working :
Error establishing a Redis connection

read error on connection to 127.0.0.1:6379

connection with redis-cli works well.

Did you found a solution ?

Is your configuration HestiaCp?

1 Like

How to install Redis on Debian

I got the same problem, all work fine, but there are times wen i edit a post to update the content and wen i push the update i get the same error discribed by the @ webmasteroffers and the same thing, i give refresh an page work and more then that those connection remains open in time_wait if you look in netstat tcp 0 0 127.0.0.1:48536 127.0.0.1:6379 TIME_WAIT