When a site built on the Wikimedia pageviews API (wikimedia.org/api/rest_v1/metrics/pageviews/...) stops updating, the failure is usually upstream, and you can prove it in three curls before you touch the host.
Symptom
Static pages stop regenerating. Local logs show a clean, repeating error, e.g.:
E2026-08-16T06:15:15 - "fetch_traffic" - urllib.error.HTTPError('HTTP Error 404: Not Found')
S2026-08-16T06:15:15 - "get_wiki_info" - succeededNote get_wiki_info (MediaWiki action API) succeeds while fetch_traffic (AQS) 404s. Network and DNS are fine; only the analytics dataset is missing.
AQS returns a semantic 404 with a body that says so, not an error page:
{"detail":"The date(s) you used are valid, but we either do not have data for those date(s), or the project you asked for is not loaded yet","status":404}Three-step triage
- Bisect the last good date on AQS, from two different networks (your laptop and the server) so you don't blame egress:
for d in 2026/08/13 2026/08/14 2026/08/15; do
printf "%s -> " "$d"
curl -sS -o /dev/null -w "%{http_code}\n" \
"https://wikimedia.org/api/rest_v1/metrics/pageviews/top/en.wikipedia/all-access/$d"
doneExclude today's date from your evidence: the current UTC day always 404s and citing it invites dismissal.
Check whether it's the
topendpoint or the whole dataset. Hitaggregateandper-articlefor the same dates, and a second project (de.wikipedia). If all of them stop on the same day, it's the dataset load, not an endpoint bug.Check the dumps, which reveal which stage of the Wikimedia pipeline died — this is the step people skip:
- Hourly:
https://dumps.wikimedia.org/other/pageviews/YYYY/YYYY-MM/ - Daily rollup:
https://dumps.wikimedia.org/other/pageview_complete/YYYY/YYYY-MM/
- Hourly:
curl -sS "https://dumps.wikimedia.org/other/pageview_complete/2026/2026-08/" \
| grep -oE 'pageviews-202608[0-9]{2}-user' | sort -u | tail -5Count hourly files per day rather than eyeballing the last one — the shape of the gap is the diagnosis:
20260813 24/24 hourly rollup present in AQS
20260814 24/24 hourly rollup MISSING not in AQS <- aggregation stage broke
20260815 6/24 hourly rollup missing not in AQS <- hourly stage then died
20260816 0/24 hourlyInterpretation:
- hourly current, daily rollup behind -> the daily aggregation/AQS load job stalled.
- hourly also stopped -> the refinery/Airflow pipeline itself is down.
- hourly complete for a day whose rollup never appeared -> the aggregation stage failed independently, before the hourly stage. That ordering argues against a single upstream stop and is the most useful thing an outside reporter can hand them.
The daily rollup and the AQS load are fed by the same stage, so pageview_complete's last date and AQS's last 200 normally match exactly. That correspondence is what upgrades "probably upstream" to "provably upstream".
Has anyone noticed? Usually not.
Don't assume an outage this size is known. In the August 2026 instance, the pipeline was dead for four days with no ticket filed by anyone. Three cheap checks establish that:
- Phabricator, via conduit
maniphest.search. The tag for this class of report isAnalytics-Data-Problem(PHIDPHID-PROJ-reppo544k2o7zy5sduy3); also checkData-EngineeringandData-Platform-SRE. Search fulltext forpageview,missing data,no datawithconstraints[createdStart]=<epoch>, and separately checkmodifiedStartin case someone commented on an existing ticket instead of filing. - Server Admin Logs, which are the giveaway for "is a human even awake":
https://sal.toolforge.org/analyticsandhttps://sal.toolforge.org/production. If the newest analytics entry predates the outage and production shows only automated nightly jobs, nobody is working on it. This is far more decisive than a status page. wikimediastatus.netcovers reader-facing availability, not the analytics pipeline. An AQS stall will never appear there.
Weekends matter: check the day of week of your last good date. A pipeline that breaks Thursday/Friday can sit untouched until Monday. Precedent tickets to cite when filing: T427171 ("PageView tool not updated since 21 May 2026"), T330184 (dumps missing and API 404ing for the same day), T370108. Grep your own historical logs for the previous occurrence to date the last one.
The trap after upstream recovers
A common design is a nightly cron that launches one poller per language with a bounded poll window:
get_data.py --update --lang en --project wikipedia --poll 36h --poll-interval 15mwith the target date defaulting to date.today() at launch. Consequences:
- Pollers pile up, but bounded. One batch per night that never succeeds. 28 languages x 2 nights = 56 stuck processes; at ~23 MB RSS each that is ~1.3 GB, enough to exhaust swap on a 4 GB box. The count plateaus at (window / interval) batches rather than growing without limit, because expiring batches are replaced.
- Days fall off the end silently. A batch whose window expires before upstream backfills is gone from the automated path; the code just
breaks out of the poll loop. Days whose pollers are still alive when upstream returns recover themselves with no intervention — in the August 2026 case, one of three missing days self-healed exactly this way. - Nothing is permanently lost: AQS serves historical dates indefinitely once loaded, so a manual backfill recovers any day. It just stops being hands-off.
Verify the whole range after recovery, not just the gap
This is the counterintuitive part. When WMF reloaded, a date that had been serving fine before the outage started 404ing: 08-11 and 08-12 were 200, 08-14 onward were 200, but 08-13 — which had been 200 throughout the outage and is still present in the pageview_complete dumps — became 404. Their reload introduced a new hole while filling the old ones, and AQS and the dumps now disagree about that day.
So after an upstream backfill, re-check every date you care about, including ones that were never affected. Count what is genuinely missing on disk before choosing a backfill window:
for d in 13 14 15 16 17 18; do
printf '%s: %s\n' "$d" "$(ls static/*/wikipedia/2026/8/$d.json 2>/dev/null | wc -l)"
done
# 13: 28 14: 0 15: 0 16: 28 17: 28 18: 28One command cut a four-day backfill to two days and revealed the self-healed day. Re-fetching known-good days is not free: it re-hits upstream and rewrites correct files.
Also compare the newest generated day page against the newest 200 from AQS — if they match, your pipeline is healthy and merely starved, and there is nothing to fix locally:
find static/en/wikipedia/2026 -name '*.html' -newermt '2026-08-01' \
-printf '%T@ %p\n' | sort -rn | head -3Before running the backfill itself, check which derived artifacts (RSS feeds, index pages) your generator rewrites from the date being processed — an unguarded rolling-window feed will rewind. That failure mode is its own lesson.
While you're on the box
An app writing nginx logs to its own directory (/home/<user>/<app>/logs/access.log) is invisible to /etc/logrotate.d/nginx, which globs only /var/log/nginx/*.log. These grow without bound and are a frequent co-discovery when you ssh in to debug something else.