Redis · 30 November 2026

What happens to WordPress when Redis goes down

A cache should make a site faster when it works and change nothing when it does not. Whether that is true of yours depends on timeouts, on what the code does with a failure, and on what it clears afterwards. Here is how to find out before Redis does it for you.

By Shane Rounce · 5 minute read

The problem: the cache becomes the outage

Redis is quick, so it is easy to forget that it is a network service. It can restart, run out of memory, fail over, or sit behind a network that drops packets for ten seconds.

What happens next depends on your cache code. A good cache steps aside and WordPress renders pages from the database, more slowly. A bad one waits for Redis on every call, in every request, until all the PHP workers are busy waiting and the site stops answering. Redis was optional. The wait made it essential.

Count the whole wait, not one timeout

A short connection timeout on its own proves little. There are three separate limits, and they multiply:

LimitQuestion it answers
Connect timeoutHow long may opening the connection take?
Read timeoutHow long may one reply take?
RetriesHow many times is a failed operation tried again?

Half a second, tried twice, for each of forty cache calls in a page is forty seconds. So the first rule is to stop asking after the first failure.

  1. Decide how long a page may spend on optional work. For a cache, that is a fraction of a second.
  2. Divide it between connect, read and retries.
  3. After one failure, remember it for the rest of the request and stop trying.
  4. After repeated failures, remember it across requests for a short while. That is a circuit breaker.

Measure on the real network. A timeout copied from a local socket set-up will produce false failures against a managed service in another zone.

What does "fail open" mean for a cache?

Failing open means a failed read is treated as a miss, and WordPress fetches the value from its original source. It is the right behaviour for anything disposable: cached pages, cached queries, transients that can be rebuilt.

It is the wrong behaviour for anything that exists only in Redis. Do not fail open on sessions, rate limits, locks that guard money, or a queue with no other copy. If Redis holds the only copy of something, it is not a cache, and it needs its own plan.

The fallback has a cost

When the cache steps aside, every request goes to PHP and the database. If the cache was hiding a site that cannot survive without it, failing open only moves the failure.

  • Know roughly how much traffic the site can serve with no cache at all.
  • Keep slow queries fixed even when the cache hides them.
  • If another cache sits in front, let it serve stale pages while the origin struggles. See Varnish in front of a WordPress page cache.

The part most caches forget: what changed while Redis was away

Here is the subtle one. Redis is unreachable for two minutes. During those two minutes an editor updates a page. The cache tries to remove the old copy, cannot reach Redis, and gives up. Redis comes back, with the old copy still in it. The site now serves the old page, and nothing will correct it until that copy expires.

A cache that fails open on reads must also remember the invalidations it could not deliver.

In Ace Redis Cache, a missed delete or flush leaves a small marker file in wp-content. While the marker exists, the early page reader declines to serve stored pages. The first request that reconnects clears that site's own keys once and then removes the marker. You will see it in the response header as outage_recovery. If the clear itself fails, the marker is put back.

What ARC does when Redis is unreachable

  • Connection and read timeouts default to half a second, and a failed operation is tried at most twice.
  • After a failure it does not reconnect again in the same request.
  • Repeated failures open a circuit for 60 seconds, so front-end requests skip Redis entirely for that time.
  • Pages are rendered live, with BYPASS; reason=redis_unavailable in the X-AceRedisCache header.
  • The plugin can be activated with no Redis present, and a fresh install starts disabled. Turning caching on requires a successful connection test.
  • define( 'ACEREDIS_DISABLED', true ); in wp-config.php stops every Redis path at once and leaves the settings screen available.

The timeouts can be changed with ACEREDIS_TIMEOUT, ACEREDIS_READ_TIMEOUT, ACEREDIS_OP_TIMEOUT and ACEREDIS_MAX_RETRIES. They are listed with the rest in constants and filters.

Make the failure visible

A site that still answers can hide a dead cache for days. The pages load, a little slowly, and nobody looks.

  • Watch the cache status header on a known cacheable URL, not only whether the page loads.
  • Alert on a run of BYPASS or MISS where you expect HIT. How to read your cache's headers explains each value.
  • Check that the drop-in files are really installed. A green plugin status is no use when the file that provides the cache was never written.
  • Log the outage once, not once per visitor.

Test it on purpose

Do this on a staging copy, on a quiet afternoon, before production does it for you at a busy time.

  1. Confirm normal behaviour: a cacheable page returns HIT.
  2. Stop Redis, or block its port with a firewall rule. Blocking is the harsher test, because a blocked port hangs where a stopped service refuses at once.
  3. Time a page: curl -s -o /dev/null -w '%{time_total}\n' https://staging.example.com/
  4. Load several pages at once and watch PHP worker use. The site should be slower, not stuck.
  5. While Redis is down, edit a page.
  6. Bring Redis back. Confirm the site reconnects without a restart, and that the edited page shows the new content.

Checklist

  • One failure per request, then stop asking.
  • A circuit breaker across requests, with a short window.
  • Fail open only for data that can be rebuilt.
  • Remember missed invalidations and clear on reconnect.
  • A visible signal when the cache is absent.
  • A rehearsal, on staging, with the port blocked.

The requirements page covers what ARC needs from Redis, and tested at scale describes the sites it runs on. If your Redis is a managed, cluster-mode service, read the read that returns nothing too: that failure was silent as well.

All notes Get the latest release