Incident Library
Applied filters Root causeData loss or corruptionComponentDatabaseClear 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

Cases2 cases

1 to 2 of 2

  1. Symptoms

    Users of the matrix.org homeserver found rooms that simply stopped working: sending a new message or joining as a new member failed, and where an error was shown at all it was "No create event in auth events". The team first heard of it from a user's bug report and similar reports in public Matrix rooms and on social media.

    Trigger

    A background cleanup job that removes state groups which were created but never used began working on the corrupted part of the state_groups_state table; the first errors appeared in the logs on 27 June 2025.

    Root cause
    Component
    Contributing factor
    –
    Detection

    A bug report from a user, followed by similar reports in public Matrix rooms and on social media.

    Remediation
    • Disabled the cleanup job that removes redundant state groups as a precaution
    • Restored the 26 June database backup into a new Postgres instance on Amazon EC2
    • Added a Postgres constraint that rejects deleting the state of a state group still in use
    • Rebuilt the corrupted index on state_groups_state overnight
    • Found the state wrongly removed by the cleanup job by comparing the restored backup with production, and re-inserted it
    Lessons

    Index corruption of this kind can sit unnoticed for months or years, because index entries that point into empty table space are ignored; it shows only once Postgres reuses that space. pg_amcheck did not detect it, although its check confirmed that no index rows were missing and the index only had extra ones.

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

Check your cluster for this

These 2 cases involve Database and PostgreSQL vacuum. 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