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

Cases33 cases

26 to 30 of 33

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

  2. Symptoms

    From around 19:00 UTC on 31 January 2017, load on GitLab.com's PostgreSQL database rose, which GitLab suspected was spam, and many users could not post comments on issues and merge requests. Around 23:00 UTC the replication of the PostgreSQL secondary fell behind and then failed, because WAL segments it still needed had already been removed from the primary.

    Trigger

    While trying to restore replication to the secondary, an engineer ran the removal of the PostgreSQL data directory on the primary, db1.cluster.gitlab.com, believing it was the secondary.

    Root cause
    Component
    Contributing factor
    Detection

    The engineer who ran the deletion on the primary noticed the mistake and stopped it a second or two later.

    Remediation
    • Raised max_wal_senders from 3 to 32 and lowered max_connections from 8000 to 2000 so PostgreSQL would restart
    • Stopped the deletion on the primary a second or two after noticing it
    • Restored the database from the LVM snapshot taken about 6 hours before the outage by copying the PostgreSQL data directory from staging
    • Restored the webhooks from a separate database built from the snapshot and imported them as a SQL dump
    • Incremented all database sequences by 100,000 so IDs used before the outage could not be reused
    • Re-enabled GitLab.com gradually
    • Rebuilt projects created after 17:20 UTC in basic form from their Git repositories on the NFS cluster
    Action items
    • Change the shell prompt (PS1) on all hosts to show more clearly which host and environment is in use
    • Monitor backups with Prometheus
    • Set PostgreSQL's max_connections to a sane value
    • Investigate point-in-time recovery and continuous archiving for PostgreSQL
    • Take LVM snapshots of the production databases every hour
    • Take Azure disk snapshots of the production databases
    • Move staging to the ARM environment
    • Recover the production replicas
    • Test recovery of PostgreSQL database backups automatically
    • Improve the PostgreSQL replication documentation and runbooks
    • Investigate pgbarman for PostgreSQL backups
    • Investigate WAL-E for database backup and realtime replication
    • Build a streaming database restore
    • Assign an owner for data durability
    • Set up multiple secondaries and balance load among them with pgpool-II
    • Provide a tool for developers to run and revert Rails migrations on staging
    • Build owned recovery procedures for the rest of the GitLab.com infrastructure, not only the database
    • Publish a backup monitoring dashboard and add more backup data to it
    • Improve the abuse reporting and response system so removal for spam does not hard delete
    • Redact engineers' names in future public incident documents
    Lessons

    GitLab split the incident into two problems: GitLab.com went down because the primary's data directory was removed by mistake during a manual, undocumented replication rebuild, and recovery took over 18 hours because the backups had failed silently, disk snapshots were not enabled and the only copy sat on slow staging disks. The backup procedure was never tested because no one owned it. GitLab chose to focus on fast, regularly practised recovery and on making it obvious which host an engineer is on, rather than on blocking commands, since a safer rm only protects against one of many ways to lose data.

  3. Symptoms

    Reports came in of more WORKER_JOB_ERROR errors, which tell Transloadit there is a communication problem between its Uploaders, the machines that receive files and orchestrate Assemblies, and its Drones, the machines that run encoding tasks. Many Assemblies became much slower because retries with exponential back-off kicked in, and a few could not be replayed.

    Trigger

    A steep increase in HLS traffic, together with more Drones online processing the same volume faster, which put more load on the central Redis nodes.

    Root cause
    Component
    Contributing factor
    Detection

    Reports of an increased number of WORKER_JOB_ERROR errors.

    Remediation
    • Re-added lost messages and relaxed heartbeat monitoring as a stopgap
    • Upgraded Redis to the latest stable version
    • Doubled the Redis cluster to six nodes and then added three more, which made it worse
    • Brought the number of read replicas down to one, which cut traffic and failure rates
    • Capped how far Drones scale up in each region
    Action items
    • Add logging and alarms for approaching saturation
    • Find ways to decentralise the traffic between the Redis nodes and the Drones and Uploaders
    • Add sharding per Uploader on top of the sharding per region
    Lessons

    To handle more traffic Transloadit had to use fewer Redis nodes, not more: each added replica multiplied the replication traffic from the single leader that takes every write, so scaling up the number of nodes was the wrong call. Bandwidth had not been among the monitored Redis metrics.

  4. Symptoms

    On July 30th, a few minutes after the OSU Open Source Lab started reloading the MySQL server mysql2 to fix its replication errors, the team saw that databases were being dropped on mysql1 as well. The script was stopped, and the MySQL service behind mysql1-vip stayed down through a long restore.

    Trigger

    On July 30th at 4:00PM PDT the team stopped slave replication on mysql2 and began dropping its databases one at a time to reload it and fix replication errors.

    Root cause
    Component
    Contributing factor
    Detection

    The team watching the reload noticed after a few minutes that mysql1 was also dropping databases; the delays between drops in the script gave them that time.

    Remediation
    • Stopped the script that was dropping databases
    • Restored the databases from the mysql-zrm backups
    • Pulled each database that failed to restore out of the 200GB backup file and restored it separately
    • Recovered most data with the binary logs from the 17th through the 30th
    Action items
    • Evaluate better replication strategies, including row-based replication
    • Store binlogs as a backup on a separate server
    • Take backups with Percona XtraBackup for much faster full restores
    • Use mydumper instead of mysql-zrm for faster logical backups
    • Improve documentation and training for complex systems
    • Test full restores regularly on a spare server as part of the backup process
    • Gather more accurate time estimates for the restore process
    • Audit the hosted databases regularly, since test and very large databases delayed the restore
    • Migrate to a bigger, more powerful MySQL cluster
    • Set a policy and tools to keep the community informed of outages, maintenance and resource use, with dashboards
    • Define and monitor capacity limits for core services
    • Implement redundancy and restore practices for core services, including staff drills
    • Migrate more core services to Chef
    • Review documentation, policies and performance metrics periodically
    • Find better ways to draw on community expertise
    • Raise funds to replace the oldest infrastructure and reduce technical debt
    Lessons

    The lab had stretched its resources to host as many projects as possible, and that came with tradeoffs such as heavily compressed backups to save disk and less redundancy than wanted; the heavy compression made this restore CPU-bound. The lab concluded that it needs to change how it plans, monitors and manages resources, and that the length of the outage and the lack of progress reports were not acceptable.

  5. Symptoms

    On Saturday, September 27, 2014 at 6:50 p.m. UTC, Mailgun saw that all its database replicas and the internal traffic between its environments in all regions were broken and reporting timeouts. Once Rackspace began rebooting cloud instances in its Chicago data center (ORD), Mailgun customers had intermittent connection failures.

    Trigger

    Rackspace, Mailgun's parent company and hosting provider, rebooted cloud instances in its Chicago data center (ORD), and the cloud maintenance triggered an error condition on Mailgun's F5 load balancers.

    Root cause
    Component
    Contributing factor
    –
    Detection

    Mailgun noticed at 6:50 p.m. UTC on September 27 that all database replicas and the internal traffic between its environments were broken and reporting timeouts.

    Remediation
    • The Rackspace networking team cleared the cached path MTU on Mailgun's F5s and on some Rackspace dedicated customers' F5s
    • Set up a new virtual IP for Mailgun services
    • Changed Mailgun's DNS settings, which forced the remote F5s to clear their caches
    Action items
    • Finish the root cause analysis of the F5 path MTU problem with Rackspace
    • Make sure maintenance of Mailgun's cloud infrastructure has no impact on Mailgun customers
Check your cluster for this

These 33 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 cause11

Capacity exhaustion6 cases

  1. IL-0379 InfluxDB Cloud queries in Azure West Europe slowed and timed out as storage pods fell behind and kept restarting
  2. IL-0288 ZooKeeperWait rose to thousands of seconds on three redundant ClickHouse instances, degrading a CDN77 data pipeline
    CDN772026
  3. IL-0305 Replicas of one Intercom Vitess shard hit 100% CPU and fell up to 2.2 hours behind, serving stale inbox data
  4. IL-0443 A Repro Aurora MySQL reader restarted unexpectedly and writer insert latency rose about sevenfold for a day or more
    Repro2019
  5. IL-0334 Instapaper's RDS MySQL bookmarks table hit the 2TB ext3 file size limit, inserts failed and the service went down
  6. IL-0296 Transloadit's us-east Redis cluster lost queued jobs and heartbeats, raising WORKER_JOB_ERROR errors for 81 customers

Breaking change in an upgrade2 cases

Organisation
  1. IL-0569 After an MHA master failover, one of three MySQL replicas failed with a malformed binlog error and could not catch up
    DeNA2026
  2. IL-0308 Most RevenueCat backend systems failed after cutover to a new Aurora PostgreSQL 14 cluster as queries became very slow

Certificate or credential expiry1 case

Organisation
  1. IL-0490 Records were missing from LootLocker's new MySQL database after a migration cutover and the service degraded for 3 hours

Software defect5 cases

  1. IL-0281 PostHog's Logs ClickHouse cluster silently deleted almost all its S3 data, losing US logs older than 3 days
  2. IL-0527 OpenStreetMap.org made no replication diffs for 16 hours as PostgreSQL logical decoding failed on a memory alloc error
  3. IL-0376 A maintenance update set off needless full syncs between Upstash Redis replicas in eu-west-1, slowing the databases
  4. IL-0589 Every Kickstarter MySQL replica on Amazon RDS stopped replicating on a duplicate-key error in the backings table
  5. IL-0303 GitHub's MySQL master failed over to a node with a cold buffer pool during a schema migration and GitHub.com went down
    GitHub2012

Cloud provider outage2 cases

Contributing factor
Organisation
  1. IL-0368 PlanetScale's control plane went down and some database branches failed queries during the AWS us-east-1 outage
  2. IL-0488 Kit's RDS MySQL write latency rose 100x and running threads jumped from 9 to 900, backing up Sidekiq job queues
    Kit2022

Operator error4 cases

  1. IL-0242 Both PostgreSQL servers behind matrix.org were lost during a disk expansion, and the homeserver was down for 24 hours
  2. IL-0431 During Mackerel's move to AWS, PostgreSQL failed over to a replica that had stopped replicating, losing an hour of data
    Hatena2017
  3. IL-0218 GitLab.com's primary PostgreSQL data was wiped by mistake and, with no working backup, the site was down about 18 hours
    GitLab2017
  4. IL-0319 Dropping databases on the MySQL replica mysql2 also dropped them on mysql1, as the pair actually ran master-master

Dependency failure2 cases

  1. IL-0526 OpenStreetMap.org went offline, then read-only, for 56 hours after HE.net routing equipment cut both fibre uplinks
  2. IL-0255 Basecamp's two redundant links between data centers dropped together and a Redis replica resync loop stalled chat

Configuration change6 cases

  1. IL-0392 MariaDB replication of section x1 between eqiad and codfw broke on a missing heartbeat row during a cookbook run
  2. IL-0374 DigitalOcean creates and management actions failed globally when its service discovery datastore lost quorum
  3. IL-0331 An RDS MySQL Multi-AZ failover lost 5 seconds of committed data and broke replication on all five read replicas
  4. IL-0430 Mackerel's Redis stopped answering during a replication setup, keepalived failed over by mistake, and Mackerel degraded
    Hatena2018
  5. IL-0325 DigitalOcean's control panel and API were down for 4 hours 56 minutes after the production primary database was deleted
  6. IL-0215 Twilio's billing Redis master lost all balances and went read-only, and auto-recharge charged customer cards repeatedly
    Twilio2013

Data loss or corruption1 case

Organisation
  1. IL-0311 BattleMetrics' primary PostgreSQL went read-only at transaction ID wraparound, breaking the website and RCON updates

DNS or network fault3 cases

  1. IL-0240 Cloudflare API requests failed and the dashboard slowed for hours after the authentication database lost its replicas
  2. IL-0210 GitHub's MySQL clusters failed over to the US West Coast and the site served slow, stale, inconsistent data for 24 hours
    GitHub2018
  3. IL-0590 F5 load balancers cached a path MTU of 296 after Rackspace reboots, and Mailgun connections failed intermittently

Hardware failure1 case

  1. IL-0323 A RAID battery backup unit failure crashed db1075, the MariaDB primary of section s3, and every s3 wiki went read-only