Static Site randomly looses Cache in specific (?) Datacenters

Every couple of days I see the following:

Cache Percentage goes down to 60% from the usual 95% and then goes back up to 95% after a few hours.

Here’s this timeframe showing in the Caching View. All misses that should not be missed. Mostly Images.

The origin server is near Frankfurt. Here’re the Frankurt Datacenter requests. It goes near flat during this time:

Here’s Chicago for comparison:

So my question is: Why does the Frankfurt Datacenter loose its Cache? Or maybe I am reading this wrong and it’s something else. My goal, of course, would be that I have continuous cache percentage of 95%.

Since the Site is near static and it has about 500k visitors a month, I’d expect the cache to not go stale.

There’s no cache purgin going on from my end or from site visitor’s end. Especially Images should not be purged - period. That’s what has me confused.

Anything I am missing here?

Tiered Cache is on. APO is on.

Thanks! :slight_smile:

Just my 2 cents, but could be that the traffic was rerouted and therefore not served from FRA, but some other POPs close to FRA. Can you please check DUS, HAM and MUC, if they took over at this time, or even AMS and CDG?

It also could be the case that your Edge TTL was reached and therefore the cache was terminated. Even if the TTL was not reached the, TTL is not a guaranteed thing, more a flexible one, that can be terminated whenever needed.

This is what’s being shown in my analytics. How can I filter by other Datacenters apart from those 15?

Here’s Amsterdam:

That actually shows, that not even one request was served by Cloudflare.
93% MISS

Thats strange. Can you provide a URL I can request and see how it behaves?

I see. Do TTL expired files refresh from origin for all Cloudflare datacenters? Or do they grab it from primary/failover tiered cache.

this is already filtered by “Served by origin”.
Here it is unfiltered:

That depends on if you have “Tiered Cache” activated or not.

But when I call it, I see this:

age for this cached image is 2.000.000 seconds old, which translates to about 23 days (75% of Edge TTL). Most other SVG files are also this age, which should not have resulted in any miss in the last 23 days for SVGs.

But when checking against some JPEGs I see a few of them:

23.000s ≈ 6-7 hours

The MISS that are relevant are just occuring on JPEG files. I can’t tell you why exactly this happened. But chances are it reached it’s TTL since a bunch of them now have the very same low age. And others are close to their Edge TTL (not Browser TTL).

1 Like

I see this would make sense, thanks for the insight! My next question would be if it’s possible to somewhat randomize the TTL so the cache doesn’t go stale all at once (thousands of images), which then puts my origin under a lot of stress for a few hours?

Like stretch the TTL out over a few days.

TTL is not strict, so Cloudflare can purge your cache files whenevery it needs. So sometimes cache is getting terminated before it actually reaches it’s TTL.

The TTL is getting set, once a request is getting served by the webserver, when a resuest is triggers is getting initiated by the client, not by the owner, since the client/visitor requests the website/assets.

But what I would recommend is Tiered Cache, since once you have a MISS on one POP it falls back to another Tiered POP and therefore will result in a much higher Request/HIT ratio then without.


Tiered Caching is already on. That’s why I was confused by the high impact on the origin. I’d expect the cache refresh to not reach the origin (that often).

It’s almost as if Frankfurt lost its cache and instead every primary datacenter is now requesting from origin until Frankfurt is back up. If that makes sense.

Thats indeed a little strange. Can you please monitor this and report back if this happens again?

1 Like

Will do! I’ve seen this 5 or 6 times in 2022 so far. Will try to get to the bottom of it. Thanks so far for the help!


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.