Cases5 cases
1 to 5 of 5
IL-0311BattleMetrics' primary PostgreSQL went read-only at transaction ID wraparound, breaking the website and RCON updatesBattleMetrics2022- Symptoms
At 03:23 UTC on 27 March 2022, BattleMetrics' primary PostgreSQL database, which holds all account, server and player information, went into read-only mode. Users first saw the website fail to load, and soon RCON updates and queries began to fail as well.
- Trigger
A corruption of the index on the player identifiers table, which BattleMetrics' logs place at about 26 February 2022, made every vacuum job fail, so transaction IDs kept climbing until Postgres stopped accepting writes on 27 March.
- Root cause
- Component
- Contributing factor
- Detection
Users failed to load the website and reported it as their API keys expired, then RCON updates and queries began to fail, and the team found that the main database no longer accepted writes.
- Remediation
- Shut the database down and dropped the corrupted player identifiers index in single-user mode
- Ran the vacuum again, which succeeded and let the database accept writes
- Rebuilt the player identifier index, which took about two hours
- Shut down the query workers and gave RCON updates priority
- Pointed services at the new Postgres primary
- Bootstrapped new replicas one after another to take load off the primary
- Restarted queries with throttling, prioritised by server population and rank, after RCON updates had caught up
- Action items
- Monitor errors in the Postgres logs
- Monitor and alert on transaction IDs
- Set up a logical replica in addition to physical replication
- Build a faster network to speed up recovery from failure
- Lessons
BattleMetrics names skipping health checks on transaction ID size as its critical mistake: the index corruption silently broke vacuum for a month, and without monitoring of transaction IDs nobody saw the database approach wraparound. Because the corruption had been replicated to the replicas, failing over did not help, and the backup servers and downloadable backups carried the same corruption. The team also found that, contrary to the error message, a full vacuum on a server in wraparound protection does not need single-user mode, and chose to run a slow, delayed service over no service while replicas were rebuilt.
IL-0240Cloudflare API requests failed and the dashboard slowed for hours after the authentication database lost its replicasCloudflare2020- Symptoms
On 2 November 2020 the Cloudflare API and dashboard were degraded for six hours and 33 minutes. The success rate of API queries dropped at times to 75%, and the dashboard was up to 80 times slower than normal, while Cloudflare's edge network kept working.
- Trigger
At 14:43 UTC a network switch in a control plane data center partly failed: it kept LACP and BGP running but stopped forwarding some packets, and it recovered on its own six minutes later.
- Root cause
- Component
- Contributing factor
- Detection
At 14:43 UTC alerts fired because the misbehaving switch was unreachable to pings. Engineers then saw that the primary authentication database was overwhelmed.
- Remediation
- Shed load from the primary authentication database by slowing SSL certificate pushes to the edge, emails and other features
- Moved API traffic that could use read replicas to the secondary data center by hand
- Sent authentication calls fully back to the primary data center when the dashboard got worse
- Rebuilt the first database replica, which put itself back into service at 21:20 UTC and returned performance to normal
- Ramped the turned-down services back up so asynchronous processing could catch up
- Action items
- Remove the cluster management limitation that requires rebuilding all replicas after a primary is promoted
- Redesign the user sessions system so dashboard traffic can be steered between data centers
- Change the auto-remediation configuration so a database replica is not promoted so quickly
- Tune each system involved to be more resilient to failures of its dependencies
- Lessons
Every system in the chain had redundancy and none failed completely; each only degraded, which made the chain of events much harder to model and foresee. Automating replica promotion so that it could trigger on a minute's notice had been a point of pride, but for at least one database a fast promotion can do more harm than the failure it answers. Most general-purpose cluster managers use Raft or Paxos rather than Byzantine fault tolerant protocols, accepting a rare failure mode in exchange for a protocol that is simpler to implement correctly and debug.
- Symptoms
At 18:40 UTC db1075, the primary database of section s3, stopped answering, and all s3 wikis went read-only because no writes could reach it. Reads kept working from the replicas. At 18:42:45 Icinga reported "PROBLEM - Host db1075 is DOWN: PING CRITICAL - Packet loss = 100%".
- Trigger
The RAID battery backup unit (BBU) of db1075, the s3 primary database host, failed and the whole host crashed.
- Root cause
- Component
- Contributing factor
- Detection
Icinga reported db1075 HOST DOWN on IRC at 18:42:45, but that alert does not page; replica Slave IO alerts followed, users reported problems on #wikimedia-operations, and the first SMS page went out at 18:56. Volunteers and staff noticed the failure before the alerts did.
- Remediation
- Power-cycled db1075 from the iDRAC after finding the BBU problem
- Let MySQL finish InnoDB recovery on db1075
- Removed read_only=ON from db1075 by hand
- Ran puppet by hand a second time so pt-heartbeat started
- Action items
- Implement or refactor a script that moves replicas when the primary is unavailable
- Fix the MediaWiki heartbeat model so pt-heartbeat does not use a super-user, avoids a single point of failure and follows the real primary without depending on puppet
- Decide what to do with the batch of hosts that already had BBU issues
- Buy a new BBU for db1075
- Remove db1075 from the primary role
- Address MediaWiki spam while the database is read-only or the primary is unavailable
- Make primary database hosts page on HOST DOWN
- Track hardware errors better in Netbox
- Lessons
A BBU failure should not crash a whole host, yet it had happened before on HP hosts. HOST DOWN on a primary database should page instead of only alerting on IRC. Starting pt-heartbeat through puppet races with MySQL startup, and the unnoticed failure kept lag reported and made the outage 8 minutes longer.
IL-0334Instapaper's RDS MySQL bookmarks table hit the 2TB ext3 file size limit, inserts failed and the service went downInstapaper2017- Symptoms
On Wednesday, February 9, 2017 at 12:30PM PT, inserts of new entries into the bookmarks table of Instapaper's MySQL database on Amazon RDS started to fail with an error. The bookmarks table, which stores the articles Instapaper users save, had grown past 2TB, and the Instapaper service was down until Thursday, February 10 at 7:30pm PT.
- Trigger
At 12:30PM PT on February 9 the bookmarks table grew past the 2TB file size limit of the instance's filesystem.
- Root cause
- Component
- Contributing factor
- Remediation
- Dumped the production database to a 5.5TB RAID-0 disk on an i2.8xlarge instance with Pinterest's SRE team
- Launched a temporary production instance with limited access to archives
- Set up an Aurora read replica of the old database as one recovery path
- Imported the data into a new MySQL RDS instance without secondary indexes, then built the indexes
- Had an Amazon engineer rsync the data from the ext3 filesystem to an ext4 filesystem mounted on the failed database
- Synced the new ext4 database with the temporary production database through row-based replication
- Promoted the new database to master and pointed the application at it
- Action items
- Define a workflow that escalates system-wide Instapaper outages immediately to Pinterest's SRE team
- Test MySQL backups every month instead of every three months
- Put a process in place with Pinterest's SRE team to recover from this type of failure
- Lessons
A filesystem limit that Instapaper did not know about and could not see made both the production database and all its backups useless, and the only way out was to restore the data onto a new filesystem. Because the hosted database could only be reached through MySQL, filesystem-level fixes such as rsync needed Amazon engineers. Even with a perfect response, rebuilding the database would have taken at least 10 hours. The lack of a disaster recovery plan for this kind of failure, and the estimate of the dump time from row counts, made the downtime and recovery longer than necessary, and the response could have drawn better on Pinterest's and AWS's people. The new escalation workflow and monthly backup tests would not have prevented this failure but would speed up the response to a future one.
IL-0215Twilio's billing Redis master lost all balances and went read-only, and auto-recharge charged customer cards repeatedlyTwilio2013- Symptoms
At 2:39 AM PDT (9:39 UTC) on 18 July 2013, services that relied on the redis-master of Twilio's billing system began to fail because the load on its host had become extreme. At 2:42 AM PDT monitoring alerted the on-call engineers to a failure in the Redis cluster.
- Trigger
At 1:35 AM PDT on 18 July a loss of network connectivity disconnected all billing redis-slaves from the redis-master at once, and all of them requested a full synchronization at the same time. On-call engineers then restarted the overloaded redis-master.
- Root cause
- Component
- Contributing factor
- Detection
At 2:42 AM PDT monitoring alerted the on-call engineers to a failure in the Redis cluster. At 3:28 AM PDT the billing system monitoring reported the anomalous charges, and at 12:36 PM PDT monitoring detected the recurrence.
- Remediation
- Restarted the redis-master to relieve the high load, which loaded a wrong configuration
- Took the billing system offline to stop further credit card charges
- Restored service to all suspended accounts
- Restored the lost account balances from the independent double-bookkeeping record in the relational datastore
- Took billing offline again after the recurrence and reactivated the newly suspended accounts
- Refunded all erroneous credit card charges
- Gave all affected accounts a credit of 10% of their last 30 days of spend
- Replaced the original Redis cluster and corrected the redis-master configuration
- Activated the billing system progressively for groups of customer accounts
- Action items
- Disable Redis restarts on the redis-master and recover the master by pivoting a slave instead
- Add fail-safes so the billing system neither suspends accounts nor charges cards when balances are missing or cannot be written
- Validate the billing system against the double-bookkeeping databases in real time
- Lessons
Losing the in-flight balances and the ability to write balances at the same time exposed a flaw in the auto-recharge system: it failed in a dangerous way, charging cards and suspending accounts instead of stopping.
These 5 cases involve Database replication and Database. 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 cause5
Data loss or corruption1 case
- Contributing factor
- Organisation
DNS or network fault1 case
- Component
- Contributing factor
- Organisation
Hardware failure1 case
- Component
- Contributing factor
- Organisation
Capacity exhaustion1 case
- Organisation
Configuration change1 case
- Component
- Contributing factor
- Organisation