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

Cases12 cases

2 to 6 of 12

  1. Symptoms

    On the event day of a global game, with close to 1000 rps per MySQL instance even after sharding and replication, a master instance stopped because of a host failure. MHA failed over automatically as usual and the service kept running, but one of the three replicas hit a replication error and could no longer follow the latest data.

    Trigger

    Under heavy load on a game event day, a MySQL master instance stopped because of a host failure, and MHA started an automatic failover.

    Root cause
    Component
    Contributing factor
    Remediation
    • Removed the replica that could not apply data from service
    Lessons

    MHA had not followed a mysqlbinlog change in MySQL 5.7.9, so under specific conditions bringing replicas up to date during failover failed. Running MySQL at large scale means meeting rare events like this, which only show when a master stops suddenly under load.

  2. Symptoms

    About an hour after LootLocker cut over from a managed database provider to its own MySQL deployment on 2026-04-28, data anomalies showed up in production. A small window of writes made shortly before the migration, spanning 2026-04-19 to 2026-04-20, had never reached the new database, and the service stayed degraded for about three hours after the cutover.

    Trigger

    On 2026-04-20 at about 16:20 BST, a routine credential rotation, made as part of an unrelated configuration fix, changed the credentials that the temporary replication process used for its database connection, and the process crashed.

    Root cause
    Component
    Contributing factor
    Detection

    Data anomalies were detected in production at about 11:30 BST, about an hour after the cutover.

    Remediation
    • Restored normal service behaviour first and deferred the root cause analysis
    • Requested a restore of the deleted source database from the previous provider
    • Replayed the affected records for impacted users from the restored source database
    Action items
    • Perform technical changes of comparable risk in a scheduled maintenance window instead of as live cutovers
    • Require a pre-cutover checklist that verifies replication or sync processes are live and caught up just before cutover
    • Require an explicit downstream impact review for credential rotations of service accounts used by long-running processes
    • Keep source systems until integrity in the target has been independently verified after cutover
    • Publish planned maintenance and migration notices in the in-product News feed as well as Discord, with clear impact statements and more advance notice
    Lessons

    The failure was a silent side effect of an unrelated change made eight days earlier: the replication process recovered and kept working, so there was no signal that data had been dropped, and a pre-cutover integrity check would have caught it. Deleting the source database before validating the new one made recovery much harder. Choosing a live migration to avoid downtime left no clean point to verify integrity, and the resulting degradation and two days of piecemeal recovery far exceeded what a short planned maintenance window would have cost. The announcement on Discord was not clear enough about the impact and came with too little notice.

  3. Symptoms

    An alert fired one day because an application's error rate had suddenly risen. The error log of the Aurora MySQL RDS instance for that time showed Aurora killing connections and declining queries to avoid running out of memory. The killed queries also made application latency worse.

    Trigger

    An application release added a batch job run every minute by a Kubernetes CronJob. Each run's short-lived pod connected to the database from a new pod IP.

    Root cause
    Component
    Contributing factor
    Detection

    An alert fired on the application's error rate.

    Remediation
    • Set performance_schema to manual management and capped two related Performance Schema parameters, unlimited by default, at 100 in the parameter group, then restarted the RDS instance
    Lessons

    When system alerts fire but the database's load metrics look calm, Performance Schema growth is worth suspecting. The two parameters that were capped are unlimited by default, so connections from ever-changing source addresses keep adding to the records. Capping them has a cost: once the cap is exceeded, per-host figures in Performance Insights are missing. Putting RDS Proxy between the application and Aurora MySQL to keep source hosts stable is another possible measure.

  4. Symptoms

    At about 23:00 UTC on 21 January 2025, an automated alert reported that the CircleCI database instance holding archived data was almost out of free storage space. From 23:50 UTC customers saw slow starts and cancellations of workflows and jobs, and delays and difficulty viewing workflows in the CircleCI UI, although pipelines for a specific project could still be viewed.

    Trigger

    A code change to a function in the archival database on 16 January 2025 unintentionally made it write an excessive number of log messages, and the database filled its storage.

    Root cause
    Component
    Contributing factor
    Detection

    An automated alert at about 23:00 UTC warned that the archival database was almost out of free storage, before customers were affected. The growing workflows queue was not linked to it at first because a separate alert about request volume fired at about the same time.

    Remediation
    • Scaled up the event consumer that processes the workflows queue at 23:44 UTC
    • Promoted a read replica of the archival database to a standalone primary at 23:55 UTC
    Action items
    • Fix the database function so it no longer writes an excessive number of log messages
    • Add a max duration to the workflows retry policy for archiving so it fails earlier than the default timeout
    • Move workflow archival to an event-based model that decouples it from the workflows service
    • Add forecast and anomaly monitoring for databases that alerts on unusual activity before it reaches critical levels
    Lessons

    The storage alert on the archival database did fire, but the database filled much faster than forecast, so there was little time to act before customers were affected. Because the workflows service called the archival service synchronously, a problem in the archival database slowed the whole workflows service.

  5. Symptoms

    A Datadog alert fired because a large number of unprocessed jobs had piled up in Kanmu's job queue and were not being worked off. The jobs were the batch enqueued at about the same time every day, in the usual volume, but the workers took far longer than normal to dequeue and process them.

    Trigger

    A heavy ad hoc analysis query from the BI tool Redash ran for a long time on the writer instance, because the Redash data source pointed at the cluster endpoint.

    Root cause
    Component
    Contributing factor
    Detection

    A Datadog alert on unprocessed jobs piling up in the job queue.

    Remediation
    • Changed the Redash data source to the reader endpoint
    • Ended the long-running Redash query with pg_terminate_backend
    • Ran VACUUM on que_jobs by hand again, which cleaned up the dead tuples
    Action items
    • Make Redash unable to connect to the writer instance even if the writer endpoint is set, by mapping its host name to a TEST-NET-1 address in the Redash container's /etc/hosts
    • Set statement_timeout on PostgreSQL users so that long queries stop automatically
    • Consider improving qg's dequeue algorithm or adopting a job queue such as river that uses SELECT FOR UPDATE SKIP LOCKED
    Lessons

    A long-running query on the same database instance, even one unrelated to que_jobs, can keep VACUUM from removing que_jobs dead tuples, so the table keeps growing and the job queue slows down. qg's design with advisory locks and a recursive CTE is sensitive to dead tuples.

Check your cluster for this

These 12 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

Breaking change in an upgrade4 cases

  1. IL-0572 About 10 million Pub/Sub messages backed up and Merpay accounting data was not written to Cloud Spanner for over a day
  2. IL-0569 After an MHA master failover, one of three MySQL replicas failed with a malformed binlog error and could not catch up
    DeNA2026
  3. IL-0314 Daily's newly upgraded Aurora MySQL database deadlocked on meeting-event queries and its call servers kept restarting
    Daily2023
  4. IL-0294 CircleCI Docker and machine jobs stalled for nearly 12 hours after a VM cleanup queue lost all its RabbitMQ consumers

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

Capacity exhaustion1 case

Organisation
  1. IL-0435 Error rates rose as Aurora MySQL killed connections and declined queries to avoid OOM while load metrics stayed flat

Faulty deployment3 cases

  1. IL-0552 CircleCI's archival database ran out of storage, slowing workflow and job starts and the display of workflows in the UI
  2. IL-0571 STORES reservation returned bursts of 504 errors when a smart-list query held a database process for over 20 minutes
    STORES2024
  3. IL-0483 Replicate's website and API returned slow responses and HTTP 500s for two hours as PostgreSQL connections ran out

Operator error1 case

Organisation
  1. IL-0582 Jobs piled up in Kanmu's PostgreSQL-based qg job queue on Aurora as dequeue slowed and dead tuples kept growing
    Kanmu2024

Configuration change1 case

Organisation
  1. IL-0511 MIT xPro stopped responding after a configuration deploy as pgbouncer logins to RDS failed with 'wrong password type'

Software defect1 case

Organisation
  1. IL-0241 A database shard could not elect a new primary, and the Stripe API failed most requests in two periods on one day
    Stripe2019