Cases3 cases
1 to 3 of 3
IL-0217Honeycomb's main MySQL database locked up under cache-miss reads and ran out of connections, a 68-minute total outageHoneycomb2023- Symptoms
Hours after a routine switch between two clusters of Retriever, Honeycomb's storage and query engine, late on 24 July 2023, the internal SLO for Shepherd, the ingest service, began to burn slowly. The performance was only marginally slow and inconsistent, with no good explanation, so engineers treated it as minor and left it for the morning.
- Trigger
Late on 24 July Honeycomb switched between two Retriever clusters to avoid a subtle bug, and the new cluster stopped writing the last-written timestamps the schema cache depends on. On the morning of 25 July a feature flag flip meant to move those writes back stopped the remaining writes entirely.
- Root cause
- Component
- Contributing factor
- Detection
Hours after the cluster switch, the internal SLO for the ingest service Shepherd started burning slowly. Engineers left it for the morning, when a chart showed that Retriever's database calls updating the last-written records had stopped.
- Remediation
- Flipped only the writes back to the other Retriever cluster with a feature flag, which did not fix the problem
- Set up circuit breakers that denied all Shepherd traffic with a 5xx error to protect the database
- Failed the hard-locked database over to a replica
- Restarted all Retriever hosts so they could provide data for the cache
- Set the last-written timestamp of every schema with traffic in the last day to now, so the schema store reloaded the cache
- Removed the circuit breaker and restarted the query hosts that failed internal checks
- Action items
- Finish the Retriever cluster migration and remove all code that could disable writes behind the cache
- Explore ways to strengthen the cache further
- Lower the contention put on the database during update storms from new schemas
- Stabilise the performance costs of some operations in the system
- Study instrumentation and experimentation that detect and handle such edge cases better
- Lessons
Locally good decisions combined into the outage: the query engine wrote the timestamps because it already saw all the data, the shared cache helped scale ingest and untangle the main database, the cluster switch was done to avoid a bug, frequent deploys hid the feature flag bug, pausing deploys during the investigation kept hosts from restarting, and past near-misses made the team expect a slow failover. Feature flags, frequent deploys, pausing deploys during incidents and learning from near-misses all contributed, although they are among the practices Honeycomb trusts most. For a rare lockup of this kind a database failover is the fastest recovery. Several recent Honeycomb incidents started from trying to avoid a subtle bug.
IL-0486Figma's PostgreSQL 9 database on RDS slowed under high write IOPS and lock contention until the site was unavailableFigma2020- 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.
IL-0303GitHub's MySQL master failed over to a node with a cold buffer pool during a schema migration and GitHub.com went downGitHub2012- Symptoms
On Monday, September 10th, 2012, during a schema migration, the health checks on GitHub's MySQL master failed and Percona Replication Manager moved the 'active' role to another node of the new three-node cluster. That node's InnoDB buffer pool was cold and it performed poorly, its health checks failed in turn, and the role failed back to the original server. GitHub.com went down.
- Trigger
A schema migration on Monday, September 10th put more load on the master database than earlier migrations had, and Percona Replication Manager's health checks on the master failed.
- Root cause
- Component
- Contributing factor
- Detection
On the morning of September 11th, a developer told the operations team that the 'standby' node was returning incorrect query results.
- Remediation
- Enabled Pacemaker's maintenance-mode so no health checks or automatic failovers ran, and let the buffer pool warm
- Powered off the out-of-date node 'c' to end the partition
- Stopped Pacemaker and Heartbeat on nodes 'a' and 'b' and started them on node 'a' only
- Started MySQL on node 'a' in the active role
- Removed the events leaked to wrong dashboards and audited the wrongly routed repositories
- Contacted the owners of the exposed private repositories
- Action items
- Change the Pacemaker configuration so the active database role fails over only when an operations engineer starts it
- Find a way to warm the InnoDB buffer pool of slave databases so failovers do not hurt performance
- Audit the Pacemaker and Heartbeat stack, focusing on the code path behind the segfault
- Run hardware tests on the server where the segfault happened
- Lessons
GitHub concluded that automated failover is not the right strategy for its primary production database: for every failover in this incident, any member of the operations team would have said it should not happen. Failovers that must happen, in an emergency or during maintenance, should not hurt performance.
These 3 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
Software defect3 cases
- Contributing factor
- Organisation
IL-0217Honeycomb's main MySQL database locked up under cache-miss reads and ran out of connections, a 68-minute total outageHoneycomb2023IL-0486Figma's PostgreSQL 9 database on RDS slowed under high write IOPS and lock contention until the site was unavailableFigma2020IL-0303GitHub's MySQL master failed over to a node with a cold buffer pool during a schema migration and GitHub.com went downGitHub2012