Worker w static assets - Too many 301 redirects (ERR_TOO_MANY_REDIRECTS)

I have made a marketing webpage on a cloudflare worker w static assets (using "assets": { "directory": "./build/client/" } in wrangler json), Most requests on page load are static assets with content hashed filenames (React Router v7) . Since RR is code splitting, there are about 30 requests being fired around the same time on a page load. The assets are verified delivered without invoking the worker, but there are intermittent periods where one or more of the static assets are returning enough 301 responses for Chrome to stop loading the request and returns a ERR_TOO_MANY_REDIRECTS in the console. The strange thing is that it happens only occasionally but can last for minutes. When a chunk of JS, the main CSS file or a font doesn't load, that is obviously pretty bad (as in page breaks completely) Any thoughts on what can be the reason? There are two redirect rules set up on the domain (see attachment), but since there is no systematic redirect on load (only intermittent), I don't suspect these being the culprit.
No description
13 Replies
svend
svendOP2mo ago
Example of these occasional 301 redirects
No description
No description
niko
niko2mo ago
This is a legitimate cloudflare bug that was introduced roughly 2 weeks ago. I am surprised that Cloudflare has not yet addressed this problem, as it has been actively disrupting my websites and appears to be worsening each day. Also, for context, It doesn't just affect workers but the entire property. 1-5% of all requests fail to load at random and get hit with a 301 moved permanently error.
svend
svendOP2mo ago
@Walshy | Workers/Pages any input on where to officially report these things? Similar posts are also found on the Cloudflare community forum.
Walshy
Walshy2mo ago
I have just been escalated the issue by the MVPs on the forums and i'm starting to look into it
niko
niko2mo ago
Awesome! I really appreciate it! Here's another post facing the identical bug we are: https://community.cloudflare.com/t/how-to-fix-301-rediect-too-many-times/759444 you can run tests on his property and load resources multiple times to eventually hit the bug
Walshy
Walshy2mo ago
please send me your account id + zones seeing the issue
niko
niko2mo ago
Will do in a sec. Also for context here's the bug impacting my property:
No description
niko
niko2mo ago
niko
niko2mo ago
so for example can send 20-30 XHR requests and 1/30 fails at random 29 load normal also from what I can see it's actually impacting all of my websites. account ID: 7b58bac59e8c5a6ca58e6af30fc32338 zone ID: e7bc0951545ceca6fba8249d40a9ec9e
svend
svendOP2mo ago
account: 7746a34790ac816eb849a4aace8c00e9 zone: d8a547dfc8d9adede4d0a61cef7294c7
Walshy
Walshy2mo ago
We're reverting an update we were rolling out - thanks for reporting
svend
svendOP2mo ago
Seriously? Colour me impressed At AWS this would have taken days if not weeks If that’s something you’re rolling out just now - for context, this issue has been ongoing for days ☺️
Walshy
Walshy2mo ago
It's been rolled out to a small percentage of free traffic since late last week By the way, this is being rolled out again - any other issues please ping me 🙂

Did you find this page helpful?