On 23 November 2026, https://jithendar.com/ stopped working for at least 28 minutes. Visitors got Cloudflare's error 520 page, a 502, or nothing at all. Every other page on the site loaded normally. The pods were healthy, the gateway was healthy, and the home page itself rendered in a few milliseconds. The broken piece was a single entry in Cloudflare's cache: the one for the home page URL. Purging that one URL fixed it.
This is the postmortem. It covers what changed, what I checked and in which order, how I restored the page, what the root cause was (and wasn't), and what I'm changing so the next deploy can't do this quietly.
Summary
| What broke | GET https://jithendar.com/ through Cloudflare returned a 520, a 502, or no response. |
| What kept working | Every other URL; the same page with a query string (/?a=1); HEAD /; the origin and the pods. |
| Duration | At least 28 minutes. First seen at 08:39 UTC, fixed at 09:07 UTC (14 to 14 IST). It may have started as early as 08. |
| Detected by | Me, opening the site. No alert fired, because nothing checks the public URL. |
| Trigger | A deploy: two merged pull requests and three rollouts in nine minutes. The new pods failed their probes while warming up. |
| Root cause | Cloudflare's cache entry for the home page URL broke during the deploy. Cloudflare kept failing that URL even when the origin answered 200. |
| Fix | Purge https://jithendar.com/ from Cloudflare's cache (Admin → Cache). |
| Code at fault | None found. The change being deployed is on every page, and every other page worked. |
What changed that morning
I was adding Google's Reader Revenue Manager code to the site. That is the small script that lets Publisher Center show prompts such as a rewarded ad or a survey. The change came in two parts in two repositories:
- moks-cms #192: a loader for the script, configured per site. Merging it builds a new
moks-cms:latestimage. - jithendar.com #17: one new key in
site.jsonwith the site's product ID. The site'ssite.jsonis deployed as a ConfigMap, so merging it runs the deploy workflow, which applies the manifests and restarts the site.
I merged them 70 seconds apart, at 08:19 and 08:21 UTC. The deploy for #17 started at once: it applied the new ConfigMap at 08:21 and restarted the Deployment at 08:22. But the moks-cms image was still building (08:20 to 08:28), so the restarted pods ran the old image with the new config. At 08:29 I re-ran the deploy to pick up the image, and it restarted the Deployment again at 08:30.
That made three rollouts in nine minutes (revisions 127, 128 and 129). Each deploy finished with a green smoke test, but the smoke test reaches the site through a kubectl port-forward to one pod. It never goes through Cloudflare.
Each new pod also spends close to a minute warming up: it renders the site's 91 public pages into its page cache before it is useful. During that window the health endpoint answers too slowly, and the startup, liveness and readiness probes all time out with context deadline exceeded. The rollout settings (maxSurge: 1, maxUnavailable: 0, two replicas) kept the site up through all of this. Even so, the pods behind Cloudflare were being replaced, and failing probes, for about a minute at a time.
Timeline
| Time (UTC) | Event |
|---|---|
| 08:19 | moks-cms #192 merged; the image build runs 08:20–08:28 |
| 08:21 | jithendar.com #17 merged |
| 08:21 | Deploy applies the new ConfigMap; restart at 08:22 on the old image; smoke test passes 08:22 |
| 08:29 | Deploy re-run to pick up the new image; restart at 08:30; smoke test passes 08:30 |
| 08:30–08:30 | New pods' startup, liveness and readiness probes time out while they warm up |
| 08:39 | First failed GET / through Cloudflare; /blog answers 200 |
| 08:41 | Both pods deleted; the new pods warm up for 52–54 s, failing probes meanwhile |
| 08:53 | Cloudflare's 520 page in the browser (Singapore edge) |
| 08:54 | A tagged GET / through Cloudflare reaches a pod and gets 200 in 3 ms; the client gets nothing |
| 09–09 | Purges from Admin → Cache |
| 09:07 | GET / through Cloudflare: 200, then served from Cloudflare's cache (HIT) |
How I narrowed it down
The first report was simply "jithendar.com not accessible". It took five questions to get from there to one cache key. I answered each one with a single command, and each answer ruled out one layer.
1. Is the whole site down?
for p in / /blog /privacy-policy; do
curl -s -o /dev/null --max-time 20 -w "$p %{http_code} %{time_total}s\n" "https://jithendar.com$p"
done/ returned nothing in 20 seconds. /blog and /privacy-policy returned 200 in under a second. So this was not an outage of the site, and probably not of the cluster either.
2. Are the pods healthy, and does a pod serve /?
kubectl -n jithendar get pods -o wide
kubectl -n jithendar get events --sort-by=.lastTimestamp | grep jithendar-com
kubectl -n jithendar port-forward pod/<pod> 18080:3000 &
curl -s -o /dev/null -w '%{http_code} %{time_total}s %{size_download}B\n' http://127.0.0.1:18080/Both pods were Running and 2/2. The events showed probe timeouts during the 08 rollout. Straight from a pod, / returned 200 with the full 174 KB page in 1.3 seconds. The response headers for / and /blog were identical apart from ETag and Content-Length. Both were served from the ISR cache (x-nextjs-cache: HIT).
3. Does the origin answer without Cloudflare?
curl --resolve sends the request for jithendar.com to an address you choose. Here that was the Istio ingress gateway's public IP, so Cloudflare is skipped while TLS and the Host header stay the same:
# ORIGIN_IP: the ingress gateway's public address (not Cloudflare's)
curl -s -o /dev/null --resolve "jithendar.com:443:$ORIGIN_IP" \
-w '%{http_code} %{time_total}s %{size_download}B\n' https://jithendar.com/It returned 200 every time, over IPv4 and IPv6, with --http1.1 and --http2, and with Accept-Encoding set to identity, gzip, br or zstd. In ten rounds side by side, the origin returned 200 ten times. In the same rounds, / through Cloudflare failed ten times and /blog through Cloudflare worked ten times.
4. Is it the page or the URL?
This was the question that settled it. Cloudflare caches by URL, so the same page under a different URL is a different cache entry:
curl -s -o /dev/null -w '%{http_code}\n' 'https://jithendar.com/?a=1'
curl -s -o /dev/null -w '%{http_code}\n' 'https://jithendar.com/?'
curl -sI https://jithendar.com/ | grep -i -E '^(HTTP|cf-cache-status)'/?a=1 and /? returned 200. HEAD / returned 200 with cf-cache-status: DYNAMIC, because Cloudflare doesn't cache HEAD. Meanwhile GET / kept failing whatever I changed about the request: IPv4 or IPv6, HTTP/1.1, a Range header, Accept-Encoding, or Cache-Control: no-cache. Through Cloudflare, the page's Cache-Control also gains max-age=3600. That shows the zone's cache rule applies to HTML.
So the page was fine, the origin was fine, and one cache key was not.
5. Does Cloudflare's request reach the pod?
Cloudflare forwards the User-Agent, and the site logs it on every request. A unique one turns a request into something you can find:
tag="dbg-$RANDOM"
curl -s -o /dev/null --max-time 70 -A "$tag" -w '%{http_code}\n' https://jithendar.com/
for p in $(kubectl -n jithendar get pods -o name | grep jithendar-com); do
kubectl -n jithendar logs "$p" -c web --since=5m | grep "$tag"
doneThe tagged request at 08:54 reached a pod, and the pod answered 200 in 3 ms. curl got no response for 70 seconds. An earlier tagged request got Cloudflare's own 502 page after 50 seconds and never appeared in the log. The ingress gateway logged no resets or errors in that window. Cloudflare's documentation for error 520 (opens in a new tab) describes this pairing: an origin status of 200 with an edge status of 520.
How I restored it
The site's admin has a cache page that can purge a URL at Cloudflare through Cloudflare's API. Between 09 and 09 the site's own caches and Cloudflare were purged from Admin → Cache. In the Cloudflare dashboard, the same action is Caching → Configuration → Purge Cache → Custom Purge with the URL https://jithendar.com/.
At 09:07 GET / through Cloudflare returned 200 five times in a row. The next response came from Cloudflare's cache (cf-cache-status: HIT). There was no rollback, no code change and no pod restart.
Two things would not have helped:
- Restarting the site. Both pods were deleted at 08. The new ones served
/correctly after their warm-up, and Cloudflare kept failing anyway. - Rolling back the change. The origin was never the problem, and a rollback would have meant another rollout.
Root cause
What I know:
- The failure was tied to one cache key at Cloudflare:
https://jithendar.com/. The same page under other keys worked. - Requests Cloudflare doesn't cache (
HEAD) worked. - The origin served
/with 200, including to Cloudflare's own request. - Purging that one key fixed it immediately, with nothing else changed.
What I infer: the entry went bad between 08 and 08, while the pods behind it were restarted three times and spent about a minute each time failing probes. A fetch of / that Cloudflare started in that window most likely ended badly: it was cut off, or it was too slow. After that, Cloudflare left the key in a state where later requests failed, even ones the origin answered in 3 ms. Cloudflare's docs read an origin 200 with an edge 520 as malformed headers or an early closed connection. The headers for / match those for /blog and /?a=1 (apart from ETag and length), and those URLs worked. That is why I put the problem in the key's state, not in the response.
What I can't see: Cloudflare's side of it. Origin Analytics will show the origin and edge status for that window, and I will add it here.
In one sentence: a deploy that restarted the site three times in nine minutes left Cloudflare's cache entry for the home page broken, and nothing in the pipeline looked at the site through Cloudflare, so the entry stayed broken until I noticed.
Was it the code change?
I found no sign of it:
- The new script is on every page, and every other page worked.
- The origin served
/with the script on it. - The purge fixed
/without any change. - After the purge, the same page with the script was cached and served normally.
The change mattered only because it caused the deploy, and the deploy was the trigger.
What let it happen
- Three rollouts in nine minutes. The site config and the image it needs arrived six minutes apart, so the site was deployed twice: once on the old image, once on the new one. Each deploy is an apply plus a restart.
- Pods fail probes while warming up. For 52 to 54 seconds after a start, the health endpoint answers too slowly and the probes time out. Nothing ties readiness to the end of the warm-up, so whether a pod takes traffic during that minute depends on probe timing.
- The smoke test skips Cloudflare. It checks a pod through a port-forward, which is exactly the part that was fine. It passed both times.
- Nothing watches the public URL. No check runs from outside through Cloudflare, so I learned about the problem by opening the site. That is also why the start time is still unknown.
- Cloudflare caches HTML by URL, and deploys never purge it. One bad entry breaks that URL for everyone the data centre serves. The site already purges Cloudflare when an article is published, but not after a deploy.
What went well, and what didn't
Went well:
- The fix took one click. The site already had Cloudflare purging wired into Admin → Cache.
- The rest of the site stayed up. Two replicas and
maxUnavailable: 0kept every other page working through three rollouts and a pod delete. - Each check removed exactly one layer. Pod, origin, URL, then Cloudflare.
Didn't go well:
- A person found it, not a check.
- The deploy reported success twice, using a test that can't see what visitors see.
- Deleting the pods changed nothing. It cost another minute of warm-up and probe failures.
- The start of the incident is unknown, so the 28 minutes is a lower bound.
Follow-ups
| # | Follow-up | Addresses | Status |
|---|---|---|---|
| 1 | Smoke-test / and a few key URLs on the public host, through Cloudflare, at the end of every deploy | 3 | Open |
| 2 | An outside check of / and /blog through Cloudflare, with an alert on 5xx or no answer | 4 | Open |
| 3 | Purge Cloudflare (at least / and the listing pages) when a rollout finishes | 5 | Open |
| 4 | A startup probe that allows the warm-up, and readiness only after the warm-up has finished | 2 | Open |
| 5 | Deploy once per change set: merge the site config after its image exists, or let the deploy wait for the image | 1 | Open |
Follow-ups 1 and 3 would have caught or fixed this one within the deploy itself. Follow-up 2 would have caught it whatever caused it.
Key takeaways
- When one URL fails and its neighbours work, check the URL before the servers. Request the same page under a different cache key (
?a=1, orHEAD). If that works, the cache layer is the suspect, not the app. - Test the path your visitors take. A smoke test through a port-forward tests a pod. It says nothing about the CDN, the gateway or DNS.
- Tag a request to follow it. A unique
User-Agentshows whether the CDN's request reached your app and what the app answered. - A CDN that caches HTML is part of every deploy. Purge it when the origin changes under it, and watch it from outside.
- Restarting the origin can't fix the cache in front of it. Find the layer before you act on one.



Discussion comments
No comments yet. Start the discussion.