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

Cases8 cases

3 to 7 of 8

  1. Symptoms

    At 02:58 UTC on 31 March 2025, the sessionstore service in both Wikimedia data centres began returning 500 errors and edits failed. MediaWikiEditFailures (session loss) fired as critical at 03:03, and SessionStoreErrorRateHigh paged at 03:04.

    Trigger

    A rise in session writes, made up of session overwrites at a high rate, filled the storage of the sessionstore Cassandra nodes. The review says the rollout of SUL3 correlates strongly with it.

    Root cause
    Component
    Contributing factor
    Detection

    MediaWikiEditFailures (session loss) fired as critical at 03:03 UTC, and SessionStoreErrorRateHigh, a high 5xx rate alert, paged the batphone at 03:04. Users also reported the problem in task T390512.

    Remediation
    • Wiped the sessionstore storage, removing all sessions, and restarted Cassandra
    Action items
    • Page when the disk utilisation trend becomes unreasonable
    • Increase sessionstore storage capacity
    • Add namespacing to sessionstore
    • Add observability of the sessionstore workload
    • Identify the cause of the high rate of storage growth in sessionstore Cassandra
    • Consider an alert, without paging, on the Cassandra error rate
    • Consider paging or alerting when Cassandra nodes enter a down state
    Lessons

    The storage growth before the node failures made their timing predictable, so an alert on high storage utilisation well in advance would have given a chance to act before users were affected, and an alert on Cassandra node failures would have told responders more than an HTTP error rate alert. A cluster seen as heavily over-provisioned can still grow quickly and unsustainably under an unusual workload.

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

  3. Symptoms

    On 20 September 2023 the sprint 82 production deployment of TANF-app failed with a disk space error while it ran a large search-index migration, search_indexes 0017, against the production PostgreSQL database on cloud.gov. Production could not be deployed again until 9 November.

    Trigger

    The sprint 82 deployment on 20 September 2023 recreated the deleted search_indexes migration 0016 and ran the large migration search_indexes 0017 against the production database.

    Root cause
    Component
    Contributing factor
    Detection

    The sprint 82 production deployment failed with a disk space error, and the large migration search_indexes 0017 was identified as the cause.

    Remediation
    • Increased the production database instance size and re-ran the migrations
    • Created a backup of the production database
    • Truncated all of the search_indexes tables
    • Redeployed the sprint 82 release
    • Fixed the bug that stored empty fields as blank strings
    Action items
    • Write troubleshooting steps for database problems into the technical documentation
    • Write wiki pages and operations playbooks that outline common problems and responses
    • Add a database section and the cf revisions command to the failed-deployment troubleshooting document
    • Keep a GitHub repository of changes made directly to production
    • Save terminal output from production debugging sessions
    • Create Django migration best practices to enforce in code reviews
    • Do not edit migrations that have been merged to develop; write a new migration instead
    • Rename auto-generated migrations to more descriptive names
    • Use one auto-generated migration per model change and regenerate when a pull request makes successive changes
    • Organise a discussion on database seeding and backups for testing
    Lessons

    The work was unplanned and pulled in many developers from a small team, so the team wants documentation and playbooks that let fewer people step away from current work. Large datasets and unexpected edge cases such as rows without space-fill had not been tested, and a copy of the production database with PII scrubbed would allow tests against real-world data. Deploying in-progress code to other environments and changing migrations afterwards had caused conflicts there.

  4. Symptoms

    At 13:36 BST on Friday August 11th 2023, minutes after MailPace reran its data clean-up job with more memory, notifications arrived that all database transactions were failing across multiple services. The managed Postgres database had gone offline, did not come back when restarted, and reported that it was out of space.

    Trigger

    The daily retention clean-up job, which had been failing with killed, was rerun with its memory raised from 1gb to 8gb, and its large destroy_all deletions filled the database disk.

    Root cause
    Component
    Contributing factor
    Detection

    Notifications that all database transactions were failing across multiple services arrived as soon as the outage began; the provider was automatically notified at 99% storage. MailPace's two status pages did not detect the outage.

    Remediation
    • Contacted the managed database provider's support
    • Notified users on Twitter and Mastodon
    • Prepared an offsite backup from six hours earlier on a new database instance as a fallback
    • The provider migrated the database to a larger instance
    • Removed the old data in production by hand, day by day, with an updated query
    Action items
    • Delete old data in batches of 50 records with in_batches in the clean-up job
    • Run the clean-up job four times a day instead of once
    • Stay on a much larger database instance with room to grow
    • Add cron monitoring to all cron jobs
    • Point the status pages at a /health endpoint that checks database access and returns a 500 error on failure
    • Investigate a hot-replica database for automated failover
    Lessons

    Several causes came together: a clean-up job that failed silently, a naive deletion that grew huge once data had piled up, a database plan without headroom for growth, and status pages that missed the outage, presumably because https://app.mailpace.com still answered 200 while the database was down. MailPace also advises that critical services such as email sending be set up with more than one provider.

  5. Symptoms

    From 05:35 UTC on 4 February 2019 Mandrill, Mailchimp's transactional email service, sent only 80% of queued emails, because one of its PostgreSQL shards, shard4, stopped accepting writes. When Mandrill engineers opened an investigation at 11:58 UTC, they saw a sharply elevated load on shard4.

    Trigger

    At 05:35 UTC on 4 February the transaction ID counter of shard4, the busiest Mandrill PostgreSQL shard, reached its upper limit and PostgreSQL shut the database down to protect against wraparound.

    Root cause
    Component
    Contributing factor
    Detection

    The first exception was logged overnight but was buried by unrelated exceptions in the centralized error reporting. Mandrill engineers opened an investigation at 11:58 UTC and, while looking for the source of the rising load on shard4, found the wraparound at 12:56 UTC.

    Remediation
    • Put shard4 into standalone mode and started VACUUM at 14:16 UTC on 4 February
    • Stopped and restarted the vacuum with settings that made it run faster
    • Started a dump and restore of the database without the Search and Url tables while the vacuum ran
    • Replaced storage volumes on the Mandrill app servers whose disks were filling with queued jobs and logs
    • Moved the job-queue tables from shard4 to other live shards
    • Truncated the Search and Url tables on the locked database at 19:12 UTC on 5 February, after which the vacuum finished in about an hour
    • Started sending from the backlog at 21:36 UTC
    • Added alerting for XID wraparound by 22:40 UTC
    Lessons

    Mailchimp named the factors that slowed its response: knowledge of and access to Mandrill systems and monitoring rested with a few people, Mandrill logging needed a locally writable disk, logs of malformed API requests were hard to separate from real application errors, job health was hard to see, and the disk space problem made partial deployments for triage risky. What helped was trained incident commanders with clear roles (incident commanders in 3-hour rotations, scribes, technical liaisons and points of contact between teams), periodic summaries with a list of recent and open decisions, and taking time in a video meeting to reassess, which led to the truncation. Running in the cloud let the team expand storage quickly, and the team was lucky that the largest table holding up the vacuum held data it could delete.

Check your cluster for this

These 8 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 cause2

Capacity exhaustion5 cases

  1. IL-0553 CircleCI's orchestration database filled its transaction log volume, and no workflows or jobs started for 50 minutes
  2. IL-0298 Wikimedia edits failed for 38 minutes when sessionstore Cassandra nodes in both data centres crashed on full disks
  3. IL-0326 A retention clean-up job filled the disk of MailPace's managed Postgres, which stayed offline for just over two hours
  4. IL-0211 A Mandrill PostgreSQL shard shut down at transaction ID wraparound and email sending was impaired for about 40 hours
  5. IL-0320 Postmark's primary MySQL disk filled but MySQL kept running, so MySQL-MMM never failed over and sending was delayed

Faulty deployment3 cases

  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
  2. IL-0552 CircleCI's archival database ran out of storage, slowing workflow and job starts and the display of workflows in the UI
  3. IL-0523 TANF-app production deployments were blocked for two months when a search-index migration ran out of database disk space