IL-0487 Autumn · 2026-03-15database
Autumn's Postgres CPU spiked and about 10% of API requests failed after a collation change left the main query unindexed
Autumn was optimising its most frequent queries and found that several indexes were not used because of a collation mismatch: customers.internal_id uses COLLATE "C" for KSUID ordering, while foreign key columns such as customer_entitlements.internal_customer_id used the default collation, and Postgres cannot use indexes across that mismatch. The most frequent query took about 150 ms instead of under 10 ms. Changing the collation on customer_entitlements first cut CPU by 30%, so the team decided to align four tables in the order customer_entitlements, customer_products, entities, customers. After the first two tables were changed, the main query lost the indexes it needed, database CPU spiked and queries failed.
Rolling back with ALTER TABLE deadlocked repeatedly against active queries, and a code-level cast did not help quickly enough. At 15:48, with help from PlanetScale support, the team shut down all application connections, reverted the collation changes, ran ANALYZE to rebuild the planner statistics and restarted. Queries returned to normal at once and CPU levelled off, and full recovery in both regions was confirmed at 16:15.
- Severity
- –
- Scope
- Autumn API: about 10% of requests failed from 15:00 to 16:15 GMT
- Users affected
- –
- Region
- both regions
- Time to detect
- 5m
- Time to resolve
- 1h 15m
Symptoms
On Sunday March 15, 2026 at about 15:00 GMT, right after collation changes were applied to the customer_entitlements and customer_products tables, database CPU on Autumn's production Postgres spiked and queries began to fail. About 10% of API requests to Autumn failed until 16:15 GMT.
The team identified the cause at 15:05 and tried to roll the collation back with ALTER TABLE. ALTER TABLE needs an exclusive lock on the table, and active queries always held locks on it, so the rollback ran into repeated deadlocks. At 15:20 a code change that cast the collation explicitly in the main customer query was pushed to get the indexes used again without a schema rollback, but with the database under heavy load it did not take effect fast enough.
Symptom Database overloadHigh error rateLock contention or deadlock
Root cause
Root cause Configuration change
- Trigger
- A migration that aligned column collations across related tables changed the collation of customer_entitlements and then customer_products on the production database.
Detection
–
Remediation
- Shut down all application connections to the database
- Reverted the collation changes
- Ran ANALYZE to rebuild the planner statistics and restarted
Action items
- Do all future column and schema migrations with the duplicate-dual-write-cutover pattern: add a new column, dual-write, backfill in small batches, create indexes concurrently, then cut over
- Add a status page
- Consider making the check and track SDKs fail open by default
Lessons
–
Sources
Related cases
IL-0574Aurora MySQL writer CPU stuck near 100% minutes after Safie pointed production at a new Amazon RDS ProxySafie · 2026same root cause · shared Database
IL-0366Cloud Storage uploads and writes in us-central1 slowed and failed with HTTP 503 as traffic piled onto a few backendsGoogle Cloud · 2026same root cause · shared Database
IL-0179With DEBUG logging and synchronous log output, a high-traffic service filled the 64 KB stdout pipe, so request threads blocked in write() while holding database connections and HikariCP ran dry, failing requests in 30-second burstsMUSINSA · 2026same root cause · shared Database
IL-0561DigitalOcean's Cloud Control Panel and Public API returned up to 25% errors in two windows as authorization timed outDigitalOcean · 2026same root cause · shared Database
IL-0283Cloudflare's core proxy returned HTTP 5xx across its network after loading an oversized Bot Management feature fileCloudflare · 2025same root cause · shared Database
IL-0528Cloud Pub/Sub could not publish or subscribe in ten regions, and some ordered subscriptions stayed stuck for hoursGoogle Cloud · 2025same root cause · shared Database
IL-0392MariaDB replication of section x1 between eqiad and codfw broke on a missing heartbeat row during a cookbook runWikimedia Foundation · 2024same root cause · shared Database
IL-0367Azure Storage in Central US rejected VM disk I/O, taking down VMs and the SQL Database and Cosmos DB services on themMicrosoft Azure · 2024same root cause · shared Database
IL-0511MIT xPro stopped responding after a configuration deploy as pgbouncer logins to RDS failed with 'wrong password type'MIT Open Learning · 2023same root cause · shared Database
IL-0331An RDS MySQL Multi-AZ failover lost 5 seconds of committed data and broke replication on all five read replicasRazorpay · 2020same root cause · shared Database
IL-0272New Cassandra nodes served reads for data they did not hold, so Monzo records looked missing and payments failedMonzo · 2019same root cause · shared Database
IL-0292App Engine Memcache was down in all regions for 1 hour 50 minutes when its global datacenter mapping could not be readGoogle Cloud · 2017same root cause · shared Database
IL-0325DigitalOcean's control panel and API were down for 4 hours 56 minutes after the production primary database was deletedDigitalOcean · 2017same root cause · shared Database
Check your cluster for this
For AI tools and scripts
- This case as JSON: https://incidentlib-api.benchlet.com/cases/IL-0487
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0487/similar
- MCP server (Streamable HTTP, no key):
https://incidentlib-mcp.benchlet.com/mcp
The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.