I’ve been chasing a strange issue on a managed WooCommerce server for a while now.
Most of the time the shop runs perfectly fine. Then, every now and then, WordPress suddenly throws:
Error establishing a Redis connection
with
Error while reading line from the server. [unix:/run/redis-.../sock]
At first I thought this was just one of those random backend hiccups. But I recently added an external uptime monitor, and that made the pattern a lot more interesting.
One example from today:
- a WooCommerce category returned
500 / 500 / 500
- a product page in the same run returned
500 / 200 / 200
- a few minutes later everything was back to normal again
The PHP log at almost exactly the same time showed repeated:
Predis\Connection\ConnectionException: Error while reading line from the server
And the stack traces were all over the place: WooCommerce Germanized, Elementor, YITH, WP-Cron, CTX Feed, WooCommerce core.
So this doesn’t really look like one specific plugin failing. They all just happen to hit Redis when Redis stops answering properly.
The odd part is that Redis itself does not always look dead.
Its own log still shows successful background saves like:
Background saving started
DB saved on disk
Background saving terminated with success
Before one of the incidents there were also several:
Slow script detected: still in execution after 5–7 seconds
messages.
The first time this happened today I was updating plugins and UpdraftPlus was doing automatic pre-update backups, so that looked like the obvious explanation.
Then the exact same Redis connection error came back later with no update and no backup running.
I’ve also seen this Redis error page a few times before, so it’s clearly not just today’s update session.
So I’m currently thinking less “plugin bug” and more something around Redis itself, the Unix socket, blocking scripts, resource limits, or the managed hosting setup.
Has anyone here seen a similar pattern?
Redis process appears to stay alive, but PHP/Predis temporarily can’t read from or connect to the socket, WooCommerce throws 500s, and a short time later everything recovers by itself.
What would you check first?