SEAKSES · 30+ Global DNS Resolvers, SSL/PKI Suite & Open REST APISpotted a bug or have an idea?
Account

Proxies Crashing Right After a Config Push? Check the Generated File's Row Count

Candra Octavian RamadhaniBy Candra Octavian Ramadhani·2026-12-06T07:18:29+08:00·7 min read
Key Takeaway

Edge proxies start failing across the fleet right after an automated config file rollout, even though no code changed. Using Cloudflare's November 2025 bot management incident, you will learn how to read proxy error logs and compare generated file size and row count against the consumer's hard limits to find the cause.

Your edge proxies start throwing 5xx errors in many locations at once, but the deploy log shows no new release. Something did change, though. A pipeline regenerated a data file on its usual schedule and shipped it to every node. In that situation, check the row count and size of the generated file before anything else, because the software reading it often has a hard limit that nobody remembers setting.

Cloudflare's bot management outage on 18 November 2025 is a well-documented example of this failure. The rest of this article walks through it the way a post-mortem would. It covers what users saw, why the investigation first went the wrong way, what the critical discovery was, how the bleeding was stopped, and what the architectural fix looks like when you apply it to your own stack.

What users saw when the proxies started failing

According to Cloudflare's published post-mortem, the impact started around 11:20 UTC. The core proxy, which is the layer that terminates traffic and runs features like bot detection before forwarding requests, began returning HTTP 5xx errors for a large share of requests. Anything that depended on that proxy suffered too. That included Workers KV, Cloudflare Access, and dashboard logins that relied on Turnstile.

The errors also came and went. Traffic would recover for a few minutes and then fail again. That pattern matters later, so keep it in mind.

From the outside, site owners mostly saw Cloudflare-branded error pages and assumed their origin server had died. That is usually the first question a support desk gets during an edge outage. Before you touch the origin, use the cf-ray header to work out which side is failing. The article on using cf-ray to tell edge from origin covers that check.

Why the first suspect was an attack

The on/off pattern looked like a large DDoS attack, so that is where the investigation initially went. A coincidence made the theory more convincing. Cloudflare's status page, which is hosted outside Cloudflare's own infrastructure, went down at about the same time. When your own systems are failing intermittently and your status page disappears too, "someone is attacking us" feels like the obvious explanation.

The real reason for the fluctuation was more boring. The bot management system uses a "feature file", a list of signals the machine learning model uses to score requests. A query against a ClickHouse database cluster regenerated that file about every five minutes, and the new file was pushed across the network. Engineers were gradually rolling out a permissions change across the cluster's nodes. If the query ran on an updated node, it produced a bad file. If it ran on a node that hadn't been updated yet, it produced a good one. So the fleet flipped between broken and healthy on the regeneration cadence until every node was updated and every file was bad.

The general rule is worth remembering. If a fleet-wide failure starts and stops on a regular interval, list every job that runs on that interval before you assume attack traffic. Compare when the errors started with the timestamps on generated artifacts: feature files, blocklists, routing tables, certificate bundles, WAF rule sets. A match between the two timelines is usually the fastest path to the cause.

The file that doubled in size

This was the critical discovery. The permissions change made the underlying tables in a database named r0 visible to the user running the query, alongside the default database the query was meant to read. The query that listed feature columns did not filter by database name. As a result, every column came back twice, and the feature file more than doubled in row count.

The consumer of that file was Cloudflare's newer proxy, called FL2 and written in Rust. It preallocates memory for a fixed number of features as a performance choice. The limit was 200, and normal usage was around 60. The doubled file went over the limit, the code that loaded it returned an error, and the code that handled that error called unwrap(). In Rust, unwrap() crashes the thread when the result is an error, so the worker thread panicked and requests failed with 5xx. The older proxy, FL, failed differently. It did not crash, but it gave every request a bot score of zero. Customers with rules that block low-scoring traffic then saw legitimate visitors blocked.

On your own fleet, the first evidence is in the proxy's logs. Search the window around the error spike for panics and limit messages. The service name below is a placeholder, so adjust it to your setup:

# Read-only: look for crashes and limit errors in the last hour
journalctl -u your-proxy.service --since '1 hour ago' --no-pager | grep -iE 'panic|unwrap|limit|exceed|too many'

Illustrative output format for a Rust panic (not the exact line from the incident):

thread 'worker' panicked at src/features.rs:120:10:
called `Result::unwrap()` on an `Err` value: too many features

If you see a message about something being too large or too many, compare the file that is live now with the last copy that worked. For a newline-delimited file, wc -l and wc -c give you the row count and byte size. sort file | uniq -d | head shows any duplicated rows. A file that suddenly has twice as many rows as yesterday, with every entry duplicated, points straight at the query or job that produced it rather than at the proxy code.

The limit itself is the other half of the comparison. It usually lives in the consumer's source code or startup config, not in the pipeline. Many teams only find it during an incident. Write down the number for every file your proxies load.

Stopping the bad file and restarting the proxies

Mitigation came in stages. Early on, the team reduced impact for Workers KV and Access by routing them around the failing proxy path. Once the feature file was confirmed as the cause, they stopped generating and propagating new feature files. Then they manually inserted a known-good file into the distribution queue and forced a restart of the core proxy so every node loaded it. Cloudflare reported that core traffic was mostly flowing normally by about 14:30 UTC, and that all systems were back to normal at 17:06 UTC as downstream services recovered.

The order of those steps is the part to copy:

  1. Stop the generator or the distribution job. If you only roll back the file, the next scheduled run will push the bad version again.
  2. Put a known-good version in place. This only works if you kept one, so your pipeline needs to retain the last version that loaded cleanly.
  3. Restart or reload consumers so they pick up the good file. Confirm on a few nodes that the error rate drops before you call it fixed.

If your proxies crash in a loop on a bad file, a restart on its own will not help, because they will load the same file again on startup. Swap the file first.

Treating generated config like untrusted input

The root problem is not unique to Cloudflare. The team that owns a pipeline trusts its output because it came from internal systems, and the proxy code trusts the same output for the same reason. Neither side checked the file against the limit the other side depended on. Cloudflare's follow-up list reflects this. It includes hardening how internally generated configuration files are ingested, applying the same checks used for user-generated input. It also includes more global kill switches for features, stopping core dumps and error reporting from eating system resources during a failure, and reviewing failure modes across core proxy modules.

For your own stack, the fix has two halves.

On the publishing side, validate the file before it is distributed, using the same limits the consumer enforces. A small gate in the pipeline is enough to start:

#!/bin/sh
# Refuse to publish a generated file that would break the consumer.
f="$1"
max_rows=200          # must match the consumer's hard limit
max_bytes=1048576     # illustrative example, set to your real limit
rows=(wc -l < "f")
bytes=(wc -c < "f")
dups=(sort "f" | uniq -d | wc -l)
if [ "rows" -gt "max_rows" ] || [ "bytes" -gt "max_bytes" ] || [ "$dups" -gt 0 ]; then
  echo "reject: rows=rows bytes=bytes duplicates=$dups" >&2
  exit 1
fi

The weak point is the hard-coded max_rows. If the consumer's limit changes and this number doesn't, the gate becomes useless. Where you can, read both values from one shared source. It also helps to alert when the row count jumps by a large ratio compared to the previous run, even if it is still under the limit. A sudden doubling is suspicious on its own.

On the consuming side, an oversized or malformed file should not crash the process. The safer behavior is usually to reject the new file, log it loudly, and keep serving with the previous version. For a feature like bot scoring, whether to fail open or fail closed is a trade-off you should decide deliberately, not something left to an unwrap(). Rolling the file out to a small set of nodes first also limits the blast radius. The internal article on blast radius patterns from Cloudflare's 2022 outage covers that side in more depth.

The practical habit to take away is this. When proxies fail across a fleet with no code change, list the generated files they load and when each one last changed. Compare the newest file's row count, size, and duplicates against the last good copy and against the consumer's limit. Then make sure the next bad file is rejected at publish time, and that a proxy given a bad file keeps running on the old one.