Page MenuHomePhabricator

Dolly Parton High load
Open, In Progress, HighPublic

Description

Summary

Following the announcement of Dolly Parton’s death on 25th August, a combination of a surge in interest in the English Dolly Parton and German Dolly Parton Wikipedia articles, together with frequent edits to those pages and unexpected system behaviors, resulted in 4 of 7 database servers responsible for caching parsed page content becoming unavailable in the Foundation’s datacenter in Ashburn, VA, US (eqiad). This resulted in widespread latency and errors (e.g., due to request timeouts) for users whose requests were routed to that datacenter between approximately 18:18 and 18:55 UTC.

Impact

This affected users whose MediaWiki requests were routed to the eqiad core datacenter. This includes users making edits (eqiad is the current primary), as well as users who are logged in or accessing content otherwise not cached at the CDN and for whom eqiad is their closest core datacenter (e.g., Europe, South America, Eastern North America). This would manifest as high response latency and / or HTTP errors due to timeouts at various layers of the stack. At peak, MediaWiki services in eqiad returned ~ 10k RPS of 503 errors, corresponding to ~ 25% aggregate availability for traffic that the CDN must pass upstream to MediaWiki.

Discussion

Background

FlaggedRevs (aka “Pending Changes”) is an extension that can be used to control the default page revision visible on normal page views and has its own bespoke integration with parser cache, a cache for rendered page content. Render-and-update ops in parser cache should be mediated with PoolCounter, a lock manager service. PoolCounter was introduced as a solution for lock contention after a similar large traffic event in 2009 (see Michael Jackson effect). The PoolCounter mechanism prevents duplicate and conflicting work in the event multiple readers encounter an out-of-date page near-simultaneously: one is elected to update the page rendering and the others wait “in the pool” for the leader to update the parser cache.

In the production deployment of MediaWiki at WMF, parser cache is a two-tier object cache design that combines a datacenter-specific memcached with a larger-capacity replicated RDBMS-backed layer using SqlBagOStuff, which implements both sharding and redundancy of stored objects across (MariaDB) servers. In normal operation, the CDN prevents most read views from hitting WMF servers at all; typically only traffic to newly-edited or rarely-visited pages falls through to the parser cache. In this case the high edit volume caused the high traffic to bypass the CDN, at which point the page is served from parser cache. The lightweight unreplicated memcached layer of the parser cache is then expected to shield the heavyweight replicated database layer of the parser cache from most traffic.

Root cause

The Dolly Parton page on both English and German Wikipedia has FlaggedRevs enabled. We believe there’s a bug in the extension’s use of PoolCounter to mediate stable-page parsing and parsercache updates (T436207). When the winning writer releases the PoolCounter lock, rather than waiters simply reading the newly rendered content, they too attempt to update the cache concurrently (first for the canonical ParserOutput, then again for the postprocessed ParserOutput), resulting in severe (database) lock contention (and potential bad content). Multiple cache keys were affected (English and German articles, mobile and desktop, details below) and because these keys were sharded the storm of writes took out multiple parsercache hosts.

At the onset of widespread impact around 18:19, parsercache SqlBagOStuff clients in eqiad started reporting “Too many connections” errors (example) when attempting to reach pc1 (pc1021), pc4 (pc1024), pc5 (pc1015), and pc8(pc1018). This is consistent with the contention scenario above - throughput plummets and client connections pile up (i.e., on the server side, we see the typical symptoms of connection overload: a drop in CPU and surge in socket activity, together with missing mysql metrics; e.g., pc1015 host and mysql metrics).

The specific servers affected (4) correspond to pairs of servers picked by SqlBagOStuff - i.e., as primary and fallback - for two key prefixes relevant to the stable revision of [[:en:Dolly Parton]] (page id 8716), enwiki:stable-parsoid-pcache:8716: (pc1, pc8) and enwiki:stable-parsoid-pcache-postproc:8716: (pc4, pc5). In addition, the key corresponding to the [[:de:Dolly Parton]] (page id 102793) postprocessed stable version output (dewiki:stable-parsoid-pcache-postproc:102793:) corresponds to (pc8, pc4) which overlaps with the servers used for [[:en:Dolly Parton]] in either an unfortunate coincidence (higher load) or fortunate coincidence (preventing the issues from cascading to additional servers). These three keys are sufficient to explain the specific servers affected, but note that this does not exclude other high-write-rate keys being involved. Logs also showed high write volume from the same root cause for the keys corresponding to the metadata index and the mobile rendering of these articles.

With over half of sections now unreachable in eqiad, the impact becomes widespread for requests that must touch parser cache: for a given parser cache key there is an ~ 86% probability that at least one of the pair of servers corresponding to a given key is affected, and ~ 29% probability that both are.

Follow-up questions

Why haven't we seen this trigger more frequently?

The administrators of English Wikipedia feel that “Pending Changes [the enwiki name for FlaggedRevs] does not work well for pages being heavily edited and is not suitable for recent high-profile deaths.” The concentration of traffic on English Wikipedia and the reluctance of enwiki admins to use Pending Changes is likely the reason why this bug has not led to a previous outage in the 11 years since this code was originally written. Given the wider use of FlaggedRevs on German Wikipedia it is surprising that a high-profile event on dewiki has not previously triggered an incident of this sort. Perhaps we’ve had high write volumes due to this bug in the past and it was the unfortunate coincidence of two heavily edited articles, both using FlaggedRevs, and both coincidentally sharding to the same parser cache hosts, which pushed us over the edge to outage this time.

Are there potential contributing factors?

Yes:

  1. Modestly reduced capacity - We were down to 7 (of 8) parsercache sections, due to pc2 having been inadvertently left depooled following maintenance in July (see T436051 for more alerting as follow-up action item)
  2. Baseline query load - In the lead-up to the incident, parsercache in eqiad was seeing higher query load due to a Data Engineering backfill job that reads page content via the MediaWiki API (recently migrated to use mw-api-int rather than the external API via webproxy; see T435555).
  3. Flagged Revisions unmaintained (T185664) - Flagged Revisions has long been known to have forked versions of old MediaWiki code which drift out of sync with changes made to core. The PoolCounter code in question is correct in core’s ParserOutputAccess, but Extension:FlaggedRevs doesn’t use that. Lack of confidence in changes to unmaintained code and difficulty getting reviewers of those patches slows deployment of fixes when incidents arise.
  4. Unnecessary cache split for mobile (T363496) - there are six cache keys used for the Parsoid render of a given page: canonical desktop output, canonical mobile output, a metadata key for the canonical output; postprocessed desktop output, postprocessed mobile output, and a metadata key for the postprocessed output. This can be reduced to five (canonical desktop and canonical mobile can be unified), but this is only an aggravating factor which increases parser cache load, not the ultimate cause. There are other keys used for legacy parses (T435645) which again adds complexity to the analysis but were ultimately not a factor in this incident.
  5. Cache key colocation/fallback - The postprocessed output and canonical output are not guaranteed to be colocated on the same parser cache host (T415110). This spreads out the load and prevents one host from taking down all the cache entries for a given article; but at the same time it may cause problems with one article to potentially spread to and affect multiple parser cache hosts. There is a well-known tradeoff between load sharing and fault isolation which we could re-examine; for example shuffle sharding could offer a different balance.
  6. ParsoidCachePrewarmJob runs even for Parsoid content (T436206) - The ParsoidCachePrewarmJob was intended to warm up the Parsoid caches when legacy content was parsed. It was never deactivated after the switch to Parsoid Read Views, so it is now adding unnecessary extra parser cache traffic every time the Article renders a page using Parsoid Read Views. Again, not ultimately responsible for this outage but contributed extra parser cache load.
  7. Parsoid has been rolled out for pageviews on pretty much all wikipedia. And, Parsoid’s wt2html latency is, on average, 2x that of the legacy parser. This likely also had an impact on the queue sizes and contention. PoolCounter was doing its job holding off readers while the render happened, but when the PoolCounter lock was finally released there could potentially be ~2x as many readers released.

Are there aspects we’re still trying to figure out?

Yes:

  1. Database load and memcached - The MultiWriteBagOStuff used by ParserCache has a multi-tier architecture which is supposed to use memcached to shield SqlBagOStuff from high load. However, this design works only for read load; all writes are replicated to all tiers, so the high write load in this incident was immediately transferred to the replicated database layer.
    • Although the basic mechanism is understood, we don’t know yet the exact mechanism by which the large write volume led to connection failures, as opposed to more graceful degradation.
    • Is T412742: MultiWriteBagOStuff surprising behavior when secondary is unreplicated but primary is replicated related? It may be relevant that both dewiki and enwiki are involved, since dewiki writes are likely to eqiad (the primary) while a sizable fraction of enwiki reads might be to codfw. Could changes to our datacenter replication allow us to handle higher write volume? (e.g., by avoiding superfluous writes in the secondary datacenter)
  2. Recovery - What happened between roughly 18:50 and 19:00 that enabled recovery?
    • Our working hypothesis is that site slowness/outage reduced the amount of edits that users were able to make to the articles in question, and with fewer edits more requests were able to hit the caches and avoid triggering the PoolCounter mechanism.

How did we become aware of the incident?

The incident was detected and escalated to SRE via paging alerts reporting failing HTTP probes for the mw-web service (MediaWiki service responsible for serving external web traffic) at 18:20 UTC (ProbeDown: Service mw-web:4450 has failed probes (http_mw-web_ip4)), followed shortly after by paging alerts consistent with parser cache database unavailability (e.g., PROBLEM - MariaDB read only pc1 #page on pc1021 is CRITICAL: Could not connect to localhost:3306).

Related Objects

Event Timeline

corto changed the task status from Open to In Progress.
corto triaged this task as High priority.
corto created this object with visibility "WMF-NDA (Project)".
corto created this object with edit policy "WMF-NDA (Project)".
BCornwall renamed this task from High load event to Dolly Parton High load.Aug 25 2026, 8:45 PM
• Scott_French changed the visibility from "WMF-NDA (Project)" to "Public (No Login Required)".Aug 31 2026, 8:48 PM
• Scott_French changed the edit policy from "WMF-NDA (Project)" to "All Users".

Change #1338213 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[operations/mediawiki-config@master] Disable parsoidCachePrewarm jobs everywhere

https://gerrit.wikimedia.org/r/1338213

Change #1338213 merged by jenkins-bot:

[operations/mediawiki-config@master] Disable parsoidCachePrewarm jobs everywhere

https://gerrit.wikimedia.org/r/1338213

Mentioned in SAL (#wikimedia-operations) [2026-09-09T15:36:19Z] <ladsgroup@deploy1003> Started scap sync-world: Backport for [[gerrit:1338213|Disable parsoidCachePrewarm jobs everywhere (T436001 T436206)]]

Mentioned in SAL (#wikimedia-operations) [2026-09-09T15:40:52Z] <ladsgroup@deploy1003> ladsgroup: Backport for [[gerrit:1338213|Disable parsoidCachePrewarm jobs everywhere (T436001 T436206)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-09-09T15:46:02Z] <ladsgroup@deploy1003> Finished scap sync-world: Backport for [[gerrit:1338213|Disable parsoidCachePrewarm jobs everywhere (T436001 T436206)]] (duration: 09m 43s)

Change #1342313 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/FlaggedRevs@master] Register configuredpages and unreviewedpages API list modules

https://gerrit.wikimedia.org/r/1342313

Marostegui closed subtask Restricted Task as Declined.Sep 22 2026, 11:07 AM

I have an idea for the next time we have such an overload event:

sudo cumin A:cp 'killall -STOP purged'

This would temporarily pause the CDN from receiving the purges emitted by Mediawiki after edits, which would mean far more CDN cache hits on the page(s) in question, which would surely help with Mediawiki saturation.

After traffic has subsided, we could SIGCONT purgeds, probably on a rolling basis, just 1 host/site at a time, or something.

The only thing that this should cost us is some consistency (trading it off for availability, which seems correct in such an event), and some temporary Kafka queuing.