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

Cases11 cases

6 to 10 of 11

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

  2. Symptoms

    On January 22, 2020 at 9:45 AM PST, Figma's database metrics showed rising write IOPS and lock contention, while database CPU was lower than normal. An automated alert followed at 10:00 AM, and by 11:42 AM enough API requests had queued up behind the database that Figma became unavailable for some users.

    Trigger

    An automatic ANALYZE on one of the tables in the query finished at exactly the moment the incident began. The new statistics pushed the planner's row estimate for an inner subquery past 200 rows, and the plan for the whole query switched to an estimate of over 20 million rows.

    Root cause
    Component
    Contributing factor
    Detection

    Database metrics showed higher write IOPS and lock contention at 9:45 AM PST, and an automated alert at 10:00 AM started the investigation.

    Remediation
    • Cancelled several inessential queries and increased the allocated IOPS
    • Cancelled autovacuum statements running on the largest tables
    • Changed autovacuum_freeze_max_age and restarted the database to stop aggressive autovacuuming
    • Took the service down for emergency maintenance and upgraded the database to PostgreSQL 11
    Action items
    • Revisit transaction timeouts and limits so long-running and expensive queries are terminated
    • Improve metrics, monitoring and database settings for autovacuuming, locking and query performance
    • Audit queries for unnecessary or excessive joins and subqueries that could trip up the query planner
    • Bring the performance tools of the upgraded PostgreSQL into the incident response plans
    • Audit the structure and access patterns of data stored in PostgreSQL and consider moving some of it to datastores suited to those patterns
    • Improve in-app messaging about unexpected maintenance windows
    • Move towards online database upgrades that do not need downtime
    • Let users keep working on already open files safely while offline, even after closing the browser
    Lessons

    Having upgraded staging to PostgreSQL 11, tested it for months and written a production upgrade plan let the team upgrade under poor conditions with confidence. A routine statistics refresh can flip a query to a catastrophic plan, and the same query's plan can differ widely over time, so comparing plans from snapshots taken at different dates exposed the cause.

  3. Symptoms

    On 12 January 2017 at 14:09 UTC, Mailgun engineers began responding to alerts for the click and open tracking services and the primary MongoDB clusters in one production region. Within ten minutes the engineers found that the MongoDB secondary servers, which serve most reads, were under heavy load and slow to answer, which also caused the tracking errors. The status page reported intermittent timeouts on the Control Panel, API, SMTP and tracking links.

    Trigger

    A gradual increase in connections to the MongoDB secondary servers, which coincided with several MongoDB configuration changes made the day before. A rollback of those changes then also introduced, by mistake, a change that moved the API and SMTP services from the secondaries to the primary.

    Root cause
    Component
    Contributing factor
    Detection

    Alerts for the click and open tracking services and the primary MongoDB clusters at 14:09 UTC.

    Remediation
    • Rolled back the previous day's MongoDB configuration changes through several pull requests from 15:15 UTC
    • Resized the MongoDB servers to handle more connections
    • Deployed connection limits at the MongoDB server level
    • Limited the number of connections the services could open to the MongoDB primary
    • Redeployed the configuration that makes services prefer secondary servers for reads
    Action items
    • Run the tracking infrastructure across two independent regions
    • Limit the number of connections every service can open to the database
    • Permanently increase the size of the primary Mongo cluster and roll the change out to the other data centers
    • Let click redirection keep working when downstream services fail
  4. Symptoms

    On 3 June 2014, PagerDuty's notification pipeline performed poorly and some notifications were delayed after the Cassandra cluster behind it became heavily degraded. About 3% of events sent to the integration API could not be received.

    Trigger

    On 3 June 2014 the Cassandra background repair process started its normal run on one node of the cluster while other high load was on the cluster; on 4 June the team restarted the postponed repair by hand.

    Root cause
    Component
    Contributing factor
    Remediation
    • Reduced the load on the Cassandra cluster
    • Stopped the Cassandra repair process
    • Cut communication between some Cassandra nodes to stabilise the cluster
    • On 4 June, deleted all in-flight data in the notification pipeline in a "factory reset"
    • Brought downstream systems back into a consistent state with the emptied pipeline by hand
    Action items
    • Scale the existing Cassandra nodes vertically to bigger, faster servers
    • Set up multiple Cassandra clusters and spread the workloads across them
    • Set system load thresholds at which the Cassandra clusters are scaled out horizontally ahead of need
    • Upgrade the current and new clusters to a more recent Cassandra version
    • Add more load shedding techniques to control Cassandra under high load
    • Bring more Cassandra expertise in-house
    Lessons

    PagerDuty concluded that its Cassandra cluster was underscaled and shared by too many services with different load and usage patterns, and that the scaling work should have come before the planned Cassandra version upgrade.

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

Check your cluster for this

These 11 cases involve Database and Database replication. 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 cause7

Faulty deployment1 case

Component
Organisation
  1. IL-0510 MIT Learn's RDS PostgreSQL ran out of storage after a release and learn.mit.edu returned 503s and 504s for hours

Breaking change in an upgrade1 case

Organisation
  1. IL-0498 Clerk's Postgres database had load spikes every 15 minutes and requests failed and slowed intermittently for four days
    Clerk2025

Software defect3 cases

  1. IL-0217 Honeycomb's main MySQL database locked up under cache-miss reads and ran out of connections, a 68-minute total outage
  2. IL-0486 Figma's PostgreSQL 9 database on RDS slowed under high write IOPS and lock contention until the site was unavailable
    Figma2020
  3. 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

Capacity exhaustion3 cases

  1. IL-0301 Basecamp 3's primary database went into total gridlock at the top of the hour and Basecamp 3 went down twice
  2. IL-0302 Peak load on GitHub's mysql1 MySQL cluster maxed out its database proxy's connections and stopped writes in March 2022
    GitHub2022
  3. IL-0383 PagerDuty's shared Cassandra cluster degraded during a repair, delaying notifications and losing incoming events

DNS or network fault1 case

Organisation
  1. IL-0240 Cloudflare API requests failed and the dashboard slowed for hours after the authentication database lost its replicas

unknown1 case

Component
Organisation
  1. IL-0387 Mailgun MongoDB secondaries were overloaded by rising connections, and a rollback then moved reads onto the primary too

Configuration change1 case

Organisation
  1. IL-0215 Twilio's billing Redis master lost all balances and went read-only, and auto-recharge charged customer cards repeatedly
    Twilio2013