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

Cases17 cases

5 to 9 of 17

  1. Symptoms

    On 2 September 2025 the matrix.org homeserver went down at 17:45 UTC and stayed down until 18:00 UTC the next day. Both machines of its PostgreSQL cluster were out of action: the original primary had lost its RAID array during a disk expansion, and the data directory of the new primary had been deleted by mistake.

    Trigger

    During maintenance to add drives, an existing drive disappeared from the primary database server's RAID 10 array at 11:17 UTC, which led to a failover and a rebuild of that server. The outage itself began when the data directory of the new primary on db-01 was deleted while clearing a failed restore on db-02.

    Root cause
    Component
    Contributing factor
    Detection

    Monitoring fired when the drive disappeared from db-02's RAID array at 11:17 UTC, and Mythic Beasts confirmed the issue. The team realised it had deleted db-01's data directory, and the backend team was then paged, an incident was opened and an emergency was declared.

    Remediation
    • Created a fresh RAID 10 array on db-02
    • Unblocked WAL archiving from the new primary on db-01 to S3
    • Started restoring db-02 from the S3 backups with wal-g
    • Shut down Synapse and the damaged primary database
    • Remounted the data partition of db-01 read-only
    • Copied the WALs missing from S3 from db-01 to db-02
    • Updated wal-g and patched it to continue from the partial restore
    • Configured a restore_command wrapper that fetched WALs from S3 and the local files, and replayed them in standby mode
    • Promoted db-02 to primary and restarted Synapse
    • Ran backups against the primary while no replica existed
    • Rebuilt db-01 as a replica from a base backup of db-02
    Action items
    • Run pg_repack to reclaim free space
    • Take incremental backups more often, since they restore faster than WAL replay
    • Reduce Synapse's storage requirements
    • Consider changing the terminal background colour by the database's role, for example by watching for the standby.signal file
    • Consider wrapper scripts around sensitive commands, such as an alias for rm, and automating operations such as starting a base backup from primary to secondary
    • Shorten the recovery time, with infrastructure from service providers
    • Upgrade wal-g on all servers and repeat disaster recovery testing with it
    • Explore ZFS local snapshots at the next hardware refresh
    • Make status.matrix.org the source of truth during incidents and keep social media updated
    Lessons

    Most of the difficulty came from the size of the database: restoring 51TB and replaying WALs took far longer than hoped, and incremental backups restore much faster than WAL replay. Running a destructive command on the wrong server was the turning point, and Matrix.org looks for better tooling and processes rather than blaming the individual; working as a trio did not catch the mistake, and server names that suggest a role caused confusion because a primary and a secondary swap roles. The recovery lost no data, but the recovery time needs to be shorter, and the wal-g versions on the disaster recovery server and the production servers had drifted apart.

  2. Symptoms

    After Point-in-time Recovery (PITR) was released to eligible new Render Postgres databases on 21 April 2023, 50% of new connections to PITR-enabled databases failed while a PITR backup job was running. A backup takes 15 to 45 minutes depending on database size, and existing connections, such as those held through connection pooling, kept working.

    Trigger

    Point-in-time Recovery was released to eligible new databases on 21 April 2023, and its backup job carried an incorrect networking configuration.

    Root cause
    Component
    Contributing factor
    –
    Remediation
    • Disabled backups for affected databases until they could be scheduled in low-traffic hours
    • Changed the backup job's network labels so the routing layer no longer picks it up as a database
    Action items
    • Tighten the process for sharing incident updates so problems are not declared resolved too early
    • Use more specific network labels for the database routing layer so ineligible IPs are never added
    • Run a skipped asynchronous job in the next scheduled window instead of immediately
    • Use open source benchmarking software to reproduce issues customers notice
  3. Symptoms

    The service API latency of Hyperconnect's Hakuna rose sharply at a certain time, periodically. The per-dependency latency analysis in the APM showed that a bottleneck in Redis caused it, but no deployment and no change in traffic pattern could have affected how Redis was used.

    Trigger

    The daily ElastiCache backup on the primary node ran while available memory was insufficient, so ElastiCache used a forkless backup that slowed user requests.

    Root cause
    Component
    Contributing factor
    Detection

    A latency graph showed the service API latency spiking periodically, and the APM's per-dependency latency analysis pointed at Redis.

    Remediation
    • Moved the ElastiCache backup from the primary node to the secondary node
    • Changed the code so data stored without a TTL is stored with one
    • Replaced the Redis Hash CrudRepository usages with a CustomRepository built on RedisTemplate
    • Ran a script that deleted the unneeded data already stored, freeing 58 GB on 3 databases
    Lessons

    The team says its Redis operation and monitoring had gaps, and lists what to watch: use a relational database when data has relationships or must be searched by value; write data that must be durable to on-disk storage rather than Redis; keep available memory at 50% or more when ElastiCache snapshots must be taken; take care that O(n) commands such as DEL on a collection do not stall production Redis; and check regularly for unnecessary I/O between the application and the database. Spring Data Redis repositories, which manage secondary indexes in the framework, suit workloads that need no TTL and need fast queries.

  4. Symptoms

    At 03:23 UTC on 27 March 2022, BattleMetrics' primary PostgreSQL database, which holds all account, server and player information, went into read-only mode. Users first saw the website fail to load, and soon RCON updates and queries began to fail as well.

    Trigger

    A corruption of the index on the player identifiers table, which BattleMetrics' logs place at about 26 February 2022, made every vacuum job fail, so transaction IDs kept climbing until Postgres stopped accepting writes on 27 March.

    Root cause
    Component
    Contributing factor
    Detection

    Users failed to load the website and reported it as their API keys expired, then RCON updates and queries began to fail, and the team found that the main database no longer accepted writes.

    Remediation
    • Shut the database down and dropped the corrupted player identifiers index in single-user mode
    • Ran the vacuum again, which succeeded and let the database accept writes
    • Rebuilt the player identifier index, which took about two hours
    • Shut down the query workers and gave RCON updates priority
    • Pointed services at the new Postgres primary
    • Bootstrapped new replicas one after another to take load off the primary
    • Restarted queries with throttling, prioritised by server population and rank, after RCON updates had caught up
    Action items
    • Monitor errors in the Postgres logs
    • Monitor and alert on transaction IDs
    • Set up a logical replica in addition to physical replication
    • Build a faster network to speed up recovery from failure
    Lessons

    BattleMetrics names skipping health checks on transaction ID size as its critical mistake: the index corruption silently broke vacuum for a month, and without monitoring of transaction IDs nobody saw the database approach wraparound. Because the corruption had been replicated to the replicas, failing over did not help, and the backup servers and downloadable backups carried the same corruption. The team also found that, contrary to the error message, a full vacuum on a server in wraparound protection does not need single-user mode, and chose to run a slow, delayed service over no service while replicas were rebuilt.

  5. Symptoms

    On a Friday evening in December 2019, Razorpay's internal monitoring alerted on an unusually high number of 5xx errors. The SRE team found that the main application, called API, could not connect to its RDS MySQL database, but within about 110 seconds the application recovered by itself and the alerts stopped. The RDS logs showed that the master instance had gone through a Multi-AZ failover.

    Trigger

    The master instance of the API application's RDS MySQL database went through a Multi-AZ failover to its standby in another availability zone.

    Root cause
    Component
    Contributing factor
    –
    Detection

    An internal monitoring alert on unusually high 5xx errors, then alerts that replication had failed on all replicas. The data loss was found the next day by matching the database against the application trace logs.

    Remediation
    • Moved all read replica traffic to the master instance
    • Recreated all five read replicas after a six-hour full snapshot and moved traffic back to them
    • Recovered the missing queries from the binary logs and corrected the data stored in RDS
    • Changed innodb_flush_log_at_trx_commit on the master from 2 to 1
    Lessons

    With innodb_flush_log_at_trx_commit set to 2, Razorpay had been open to data loss on any failover all along, even though RDS Multi-AZ copies everything on the primary's disk to the standby. The incident also taught the team how RDS runs a Multi-AZ setup and its failovers.

Check your cluster for this

These 17 cases involve Database backups and snapshots 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 cause8

Capacity exhaustion3 cases

  1. IL-0309 Preset's RDS PostgreSQL 14.7 to 17.9 upgrade in US East 1 ran out of storage and took Superset down for six hours
    Preset2026
  2. IL-0453 Hakuna API latency spiked every day during the ElastiCache Redis backup as memory filled and the backup went forkless
  3. IL-0334 Instapaper's RDS MySQL bookmarks table hit the 2TB ext3 file size limit, inserts failed and the service went down

Software defect2 cases

Organisation
  1. IL-0281 PostHog's Logs ClickHouse cluster silently deleted almost all its S3 data, losing US logs older than 3 days
  2. IL-0485 Dropbox went down when an OS upgrade script reinstalled active MySQL master-replica pairs and backup restores ran slow

Faulty deployment2 cases

Organisation
  1. IL-0380 A compaction change in InfluxDB Cloud us-east-1 dropped data from compacted files, and queries missed data for weeks
  2. IL-0371 Half of new connections to Render Postgres databases with point-in-time recovery failed while their backup jobs ran
    Render2023

Breaking change in an upgrade1 case

Organisation
  1. IL-0484 Slurm 24.05 to 25.05 upgrade broke GPU configuration on MIT CSAIL's cluster, and a failed downgrade kept it down

Operator error5 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-0218 GitLab.com's primary PostgreSQL data was wiped by mistake and, with no working backup, the site was down about 18 hours
    GitLab2017
  3. IL-0573 A developer's mistake dropped nine main tables of the Baemin billing MariaDB database and payments briefly stopped
  4. IL-0319 Dropping databases on the MySQL replica mysql2 also dropped them on mysql1, as the pair actually ran master-master
  5. IL-0538 Sakura Cloud storage maintenance deleted 53 in-use customer disks, and the disks could not be restored from backup

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

Configuration change2 cases

  1. IL-0331 An RDS MySQL Multi-AZ failover lost 5 seconds of committed data and broke replication on all five read replicas
  2. IL-0325 DigitalOcean's control panel and API were down for 4 hours 56 minutes after the production primary database was deleted

DNS or network fault1 case

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