Incident Library
  • Root cause
  • Component
  • Symptom
  • Contributing factor
  • Case

Cases3 cases

1 to 3 of 3

  1. Symptoms

    Right after a script ran on the CockroachDB nodes behind Cookie Run: Kingdom, hundreds of alerts fired at once for error rate, database connections and health checks, and the game could no longer be played normally. Emergency maintenance started at 16:52.

    Trigger

    On the Monday after the launch weekend, storage use was growing with the number of users and the cluster had about 36 hours left before its disks would fill. The team ran a prepared script to create ballast files on every node, as the official guide for CockroachDB 19.1.11 recommends. The ballast file path in the script was set wrong and pointed at a block device, and the command had no check for an existing file at the target path, so it overwrote the partition.

    Root cause
    Component
    Contributing factor
    Detection

    Metrics and alerts set up in advance fired hundreds of alerts on error rate, database connections and health checks right after the script ran.

    Remediation
    • Started emergency maintenance of the game at 16:52
    • Wrote Spark code that extracts the contents of CockroachDB SST files to CSV, and modified the CockroachDB CLI to make it more than 10 times faster
    • Converted about 7.5TB of SST files from the 7 surviving nodes to CSV
    • Deduplicated the extracted rows and merged them into one large CSV file that could be imported
    • Imported the latest snapshot and the latest 300 journal entries per user into a new cluster with more storage
    • Restored the other tables from the latest backup and rebuilt the user table from snapshots and journals with server logic
    • Checked the restored data against a database restored from backup, against analytics logs for sampled users, and with snapshot replay for every user
    • Reopened the game at 23:37 on the second day, after 30 hours 50 minutes
    • Failed over the AWS RDS database of the DevPlay platform after the reopening traffic overloaded it
    • Built a third database cluster on more m5d instances and moved the data with the official backup and restore
    • Ended the maintenance at 8:30, after 36 hours 29 minutes
    Action items
    • Require at least two engineers for any work on production infrastructure, however small
    • Write the scripts and the scenario for each infrastructure task in advance and have the team review them
    Lessons

    Because a person's mistake caused the failure, Devsisters changed its process for infrastructure work rather than relying on individual care: even experienced engineers make mistakes, so the prevention has to be built into the system. The author credits the recovery to an incident policy that does not blame the individual and asks for detailed records, to past incidents that were written down so people without the experience knew what to do, and to having infrastructure operations and data analysis teams with the needed infrastructure and skills in one organisation.

  2. 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.

  3. Symptoms

    From 12:47 AM PDT on 21 April 2011, a subset of Amazon EBS volumes in one Availability Zone of the US East Region could no longer serve reads or writes, and EC2 instances that tried to use them got stuck as well. AWS called these "stuck" volumes. EBS API calls across the whole US East Region also returned high error rates and latencies during two periods on the first day.

    Trigger

    During a routine network change to upgrade the capacity of the primary EBS network in one Availability Zone, traffic was to be shifted off one of the redundant routers. The shift was executed incorrectly and sent the traffic onto the lower-capacity replication network instead of the other primary router, which could not carry it.

    Root cause
    Component
    Contributing factor
    Remediation
    • Rolled back the incorrect traffic shift, which restored network connectivity
    • Disabled all new Create Volume requests in the affected Availability Zone at 2:40 AM PDT
    • Disabled all communication between the degraded EBS cluster and the EBS control plane from 8:20 AM PDT
    • Stopped EBS servers in the degraded cluster from futilely contacting other servers for free space
    • Changed the EBS control plane so new EBS-backed instance launches stopped failing
    • Moved spare server capacity physically from across the US East Region into the degraded cluster
    • Adjusted the negotiation throttles so the new servers could join without flooding the old ones
    • Built a separate EBS control plane partitioned to the affected zone and finer-grained throttles, then processed the backlog
    • Restored the remaining volumes from S3 snapshots taken early in the event
    • Restored volumes on failed machines that had no snapshot after forensic work
    • Intervened by hand on the RDS multi-AZ instances that did not fail over automatically
    Action items
    • Audit the change process and add automation to prevent the traffic shift mistake
    • Change capacity planning and alarming to keep the extra safety capacity needed for large recovery events
    • Change the retry logic in EBS nodes to back off harder and reconnect to previous replicas instead of searching for new nodes
    • Test and deploy the fix for the race condition that crashed EBS nodes
    • Fix the RDS bug that kept multi-AZ instances from failing over automatically
    • Improve the EBS control plane timeout logic to prevent thread exhaustion when one zone's cluster is slow
    • Make the EBS control plane aware of Availability Zones so it sheds load when over capacity
    • Move more EBS control plane functions into per-cluster services that run in the same zone as the cluster
    • Offer multiple Availability Zones to Amazon VPC customers
    • Provide better tools for building multi-AZ applications that survive the loss of a zone
    • Host free webinars and publish whitepapers on fault-tolerant architecture
    • Build the fine-grained control and throttling used in recovery into the EBS nodes and automate the recovery models
    • Look at changes that keep volumes working while a cluster is degraded, including the ability to take a snapshot of a stuck volume
    • Send more frequent and detailed customer updates and staff developer support more widely during events
    • Develop tools that show through the APIs whether instances are impaired
    Lessons

    AWS writes that with more spare capacity the cluster would have absorbed the re-mirroring requests without a storm, and that it now understands how much capacity large recovery events need. The event also showed that the EBS control plane let a failure in one Availability Zone affect the others, so more work is needed to make zones behave as if completely independent. AWS adds that some customers had critical components in a single zone, and that multi-AZ deployments need to become easier to design and run.

Check your cluster for this

These 3 cases involve Database and Cloud block storage. 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 cause2