Cases4 cases
1 to 4 of 4
- Symptoms
On 2025-03-12 from 10:58 UTC, alerts for high backend response times came in, and the MediaWiki deployments mw-api-int, mw-parsoid and mw-jobrunner, which serve MediaWiki for non-user-facing purposes, showed high latency and database errors. The External Storage cluster, whose hosts store the compressed text of wiki page revisions, had a sharp rise in load and connections. The same happened again on 2025-03-13 from 11:15 UTC.
- Trigger
At 10:44 UTC on 12 March a Scap deployment of the PHP 8.1 rollout for mw-api-int, mw-parsoid and mw-jobrunner was run with the flag -Dbuild_mw_container_image:False; the rollout was deployed with Scap again at 11:15 UTC on 13 March.
- Root cause
- Component
- Contributing factor
- Detection
Alerts for high backend response times started at 10:58 UTC on 12 March, 14 minutes after the Scap deployment; 2 on-call engineers were paged. The MediaWikiMemcachedHighErrorRate alert that pointed at the cause fired only briefly because its log pipeline was overloaded.
- Remediation
- Deployed a patch to cirrus-streaming-updater that reduced SUP parallelism
- Reduced the concurrency of the categoryMembershipChange job in changeprop-jobqueue
- On 12 March, reverted 1126607 and 1126650 and re-ran Scap
- On 13 March, rolling-restarted changeprop-jobqueue
- Rolling-restarted mw-api-int
- Disabled the categorymembership job in changeprop-jobqueue
- Reverted 1127476 and 1127478
- Redeployed mw-api-int to pick up the revert
- Increased the number of mw-api-int replicas
- Redeployed mw-jobrunner to pick up the revert
- Redeployed mw-parsoid to pick up the revert
- Action items
- Reduce the number of messages sent through channel:Memcached during failures
- Add helm rollback functionality to Scap
- Decide whether Scap should update helmfile-defaults when -Dbuild_mw_container_image:False is set
- Consider removing envvars.inc from MediaWiki images
- Consider "Why" dashboards that give an overview of a group of related components together with relevant links to follow
- Coordinate incident responders better
- Be able to work with MediaWiki developers during incidents
- Lessons
The write-up puts the weight not on the technical root cause but on why the team could not see, even after the 12 March incident, that three MediaWiki deployments were running without Memcached. Alert dashboards showed what was happening, such as many busy PHP workers, but not why; dashboards linking components that affect each other, such as SQLBlobStore keys and External Storage, would have helped. The alert that pointed in the right direction did not stay firing and would probably have been lost among 78 others. The incident coordinator could not tell who was working on what or who had joined or left, the channels were noisy, the external impact was judged more critical than it was, and trace.wikimedia.org was not used although it might have helped.
IL-0571STORES reservation returned bursts of 504 errors when a smart-list query held a database process for over 20 minutesSTORES2024- Symptoms
About 20 minutes into a batch that rewrote the preset smart-list data of STORES 予約 (STORES reservation), an alert fired for a sudden rise in 504 errors (Gateway Timeout). The work had started a little after 03:00 UTC, and the metrics watched during it, such as web server response latency and the load of the writer database, had shown no large change.
- Trigger
The preset smart lists 初回予約の顧客 (first-reservation customers) and 要フォロー顧客 (customers needing follow-up), created more than a month earlier, were rewritten with new search parameters after the search specification changed, which switched them onto the new search query.
- Root cause
- Component
- Contributing factor
- Detection
An alert on a sudden increase in 504 errors (Gateway Timeout), about 20 minutes after the preset rewrite batch started.
- Action items
- Rework the database design so the inline-view search logic is no longer used
- Add a test that checks this API's EXPLAIN output for scans larger than expected
- Provide an environment where the timing of this logic can be measured easily
- Lessons
Rushing to meet the schedule led to both a failure that affected users and a later release. In a multi-tenant database an EXPLAIN that shows index use can still hide large scans, tests need the case where one query is fast and the next is slow, the metrics to watch during a data change are those of the instance that serves the affected queries, and metrics sent at the end of a request are lost for requests that never finish.
IL-0566Hot ranges after a Cookie Run: Kingdom guild update drove CockroachDB nodes to 100% CPU, forcing emergency maintenanceDevsisters2021- Symptoms
About half an hour after the Cookie Run: Kingdom guild update maintenance ended at 11:00 on 6 March 2021, one CockroachDB node was using all 24 cores of its 24-core machine and server metrics began to show a significant number of errors. Soon two more nodes showed abnormal CPU use.
- Trigger
During the guild update maintenance, new guild tables were added and pre-split across the cluster, and a new database node was added to replace one removed a few days earlier for a physical hardware issue. When the game reopened, all players at once wrote to existing tables whose primary-key prefixes were new or had changed in the update.
- Root cause
- Component
- Contributing factor
- Detection
Monitoring after the maintenance showed one node's CPU at the ceiling together with errors in server metrics. Later a Slack alert reported a node failing its Host Status Check, and the abnormal-log channel reported filemap_fdatawait_range_keep_errors.
- Remediation
- Blocked new logins without kicking players already in the game, using the maintenance switch as a makeshift access queue
- Put the game into full emergency maintenance at 14:50 when several nodes failed health checks
- Backed up the game data table by table after the full database backup stalled
- Paused writing play records to reduce load on the database before reopening
- Split the problem tables from about 18:30
- Decommissioned the node that failed its Host Status Check
- Reopened the game and used the login-block queue again when a node reached 100% CPU
- Terminated the node that kept returning to 100% CPU
- Lessons
In a single-server relational database a change to the primary-key prefix is usually harmless, but in CockroachDB's distributed design such a change on a production cluster needs great care. The team had studied this in CockroachDB documentation, but living through it taught far more than reading about it.
IL-0391GoCardless API requests timed out for about 15 seconds while a Postgres migration waited for an AccessExclusive lockGoCardless2015- Symptoms
Just after a planned Postgres schema migration started, GoCardless received alerts that API requests were timing out. The API was down for about 15 seconds, until the migration went through and the API came back.
- Trigger
A deploy with a schema migration that renamed the empty invoicing tables and dropped and recreated their foreign key constraints, which referenced some of the most heavily used tables.
- Root cause
- Component
- Contributing factor
- Detection
Alerts about API requests timing out began just after the schema migration started.
- Lessons
Avoiding renames of tables in use, table rewrites under an exclusive lock and expensive work while holding one was not enough for GoCardless: a short DDL statement can still cause downtime by waiting in the lock queue behind a long-running query. GoCardless recommends removing long-running queries and transactions from the application and running analytics on an asynchronously updated replica, setting log_min_duration_statement and log_lock_waits to find such queries, setting lock_timeout in migration scripts so a deploy aborts rather than taking the application down, splitting schema changes so locks are held for shorter times, and keeping Postgres up to date. Developers with a console on the production database can cause the same downtime by leaving a transaction open.
These 4 cases involve Database and In-memory cache. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause1
Faulty deployment4 cases
- Contributing factor
IL-0324Three MediaWiki deployments lost Memcached after a PHP 8.1 rollout and overloaded the External Storage database clusterIL-0571STORES reservation returned bursts of 504 errors when a smart-list query held a database process for over 20 minutesSTORES2024IL-0566Hot ranges after a Cookie Run: Kingdom guild update drove CockroachDB nodes to 100% CPU, forcing emergency maintenanceDevsisters2021IL-0391GoCardless API requests timed out for about 15 seconds while a Postgres migration waited for an AccessExclusive lockGoCardless2015