IL-0369 Railway · 2025-12-09database
Railway's backend API went down when a column migration waited on locks and replicas could not get database connections
Railway's backend runs as several replicas connected to a shared PostgreSQL database, with PgBouncer pooling the connections. A migration that added a nullable column to a heavily used table of about 1 billion rows stalled because a long-running query on the same table held locks. While the migration waited, connection attempts piled up and PgBouncer exceeded the database's connection limit, so the replicas could not obtain connections, failed their health checks and were taken out of rotation, which took the backend API down. When the long-running query finished and released its locks, the migration applied at once, the replicas reconnected and passed their health checks, and the backend was serving traffic again at 15:26 UTC, eight minutes after the lock conflicts began. The report's title and byline give 8 December 2025, while its timeline places the incident on 9 December 2025.
- Severity
- –
- Scope
- Railway backend API: dashboard access, CLI operations, GitHub-based deployment processing, login and API functionality; running deployments stayed online
- Users affected
- –
- Region
- –
- Time to detect
- –
- Time to resolve
- 8m
Symptoms
At 15:18 UTC on 9 December 2025, Railway's backend replicas became unhealthy and stopped serving traffic. Dashboard access, CLI operations, logins, the API and the processing of GitHub-based deployments were disrupted, while running deployments stayed online.
Each backend replica stays in rotation only while its periodic health check passes, and a replica that cannot get a database connection is marked unhealthy. Lock conflicts in the shared PostgreSQL database stalled a schema migration, connection attempts accumulated until PgBouncer went past the database's connection limit, and the replicas failed their health checks and were removed from rotation. All replicas recovered at 15:26 UTC, when the migration finished.
Symptom Probe failuresLock contention or deadlockDatabase overloadService outage
Root cause
Root cause Faulty deployment
- Trigger
- Engineers merged a database schema change with a data migration at 15:03 UTC, and the migration began applying at 15:17 UTC. It added a nullable column to a heavily used table of about 1 billion rows.
Detection
–
Remediation
–
Action items
- Increase database connections and reconfigure PgBouncer to work within those limits
- Fix the long-running query so it no longer causes row lock issues
Lessons
–
Sources
Related cases
IL-0570Dropping an unused MySQL table stalled queries on its busy parent table and crowdworks.jp was hard to reach for a minuteCrowdWorks · 2026same root cause · shared Schema migration, Database
IL-0315Railway's backend API went down when an index build locked a billion-row Postgres table and used up every connectionRailway · 2025same root cause · shared Database, Database proxy and connection pooler
IL-0307Supabase's Postgres connection pooler Supavisor 2.0 dropped connections for about 80% of us-east-1 tenantsSupabase · 2025same root cause · shared Database, Database proxy and connection pooler
IL-0554A database migration used up Sentry US's Postgres connections, and the site and event ingestion were down for 22 minutesSentry · 2024same root cause · shared Schema migration, Database
IL-0523TANF-app production deployments were blocked for two months when a search-index migration ran out of database disk spaceU.S. Department of Health and Human Services · 2023same root cause · shared Schema migration, Database
IL-0524An index migration locked Open Collective's whole Transactions table and degraded the service for nearly an hourOpen Collective · 2023same root cause · shared Schema migration, Database
IL-0391GoCardless API requests timed out for about 15 seconds while a Postgres migration waited for an AccessExclusive lockGoCardless · 2015same root cause · shared Schema migration, Database
IL-0356Every domain hosted on Railway returned HTTP 404 to new connections for five minutes because route lookups failedRailway · 2026same root cause · shared Database
IL-0136A deployment that cleared an internal service's caches at peak traffic sent 20 times the normal load to the Azure OpenAI metadata backend in Sweden Central, and health checks that depended on its database restarted instances in a loop for almost six hoursMicrosoft Azure · 2026same root cause · shared Database
IL-0510MIT Learn's RDS PostgreSQL ran out of storage after a release and learn.mit.edu returned 503s and 504s for hoursMIT Open Learning · 2026same root cause · shared Database
IL-0380A compaction change in InfluxDB Cloud us-east-1 dropped data from compacted files, and queries missed data for weeksInfluxData · 2026same root cause · shared Database
IL-0547Buildkite annotation queries timed out and drove database CPU up across shards after a migration removed an indexBuildkite · 2025same root cause · shared Database
IL-0327After a blue/green upgrade of CircleCI's workflows database every query hit disk, and workflow starts lagged or failedCircleCI · 2025same root cause · shared Database
IL-0324Three MediaWiki deployments lost Memcached after a PHP 8.1 rollout and overloaded the External Storage database clusterWikimedia Foundation · 2025same root cause · shared Database
IL-0552CircleCI's archival database ran out of storage, slowing workflow and job starts and the display of workflows in the UICircleCI · 2025same root cause · shared Database
IL-0571STORES reservation returned bursts of 504 errors when a smart-list query held a database process for over 20 minutesSTORES · 2024same root cause · shared Database
IL-0293Cloud Bigtable in us-central1 had higher latency and connection errors for about 32 hours from low-rate packet lossGoogle Cloud · 2023same root cause · shared Database
IL-0567Aurora MySQL behind Cookie Run: OvenBreak hit 100% CPU after a sales-ranking feature launch, and players could not playDevsisters · 2023same root cause · shared Database
IL-0483Replicate's website and API returned slow responses and HTTP 500s for two hours as PostgreSQL connections ran outReplicate · 2023same root cause · shared Database
IL-0371Half of new connections to Render Postgres databases with point-in-time recovery failed while their backup jobs ranRender · 2023same root cause · shared Database
IL-0328A field type change in the database of CircleCI's job distribution service left all jobs stuck in "not running"CircleCI · 2021same root cause · shared Database
IL-0566Hot ranges after a Cookie Run: Kingdom guild update drove CockroachDB nodes to 100% CPU, forcing emergency maintenanceDevsisters · 2021same 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-0369
- The cases most like it: https://incidentlib-api.benchlet.com/cases/IL-0369/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.