Incident Library
Applied filters Root causeOperator errorSymptomDatabase overloadFactorNo safeguard on destructive changeClear allEvery case under the filters, with no sentence; newest first.
Suggested filters Search, and the values found in your words appear here.

Graph

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

Cases1 case

1 to 1 of 1

  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.

Check your cluster for this

This case involves 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 cause1