How a broken release name overloaded our symbolication database
A handful of customer releases with unexpanded names like `VERCEL_GIT_COMMIT_SHA` accumulated tens of millions of URL index rows in Sentry's Postgres 14 files database, and an unbounded source-map URL lookup kept scanning them, timing out and being retried. Capping each lookup at 1,000,000 scanned rows and caching the miss cut CPU on the busiest host from 76% to 19% and symbolication timeouts by 98%, which bigger instances and extra indexes had failed to do. Other fixes included splitting a fragile multi-table debug ID join into single-table queries, keeping renewal dates only on the bundle row, skipping generated file names in the URL index (35% fewer inserts), and disabling Postgres JIT, which cut one query from 14.5 ms to 0.12 ms. The takeaways are to bound per-request work and to avoid retrying queries that can never succeed.
Related posts
- July 27 incident update
Deno easyNoviceA database schema change that dropped a column and replaced it with another, deployed at the same time as code using the new column, took Deno Deploy projects and deno.land down for 6 minutes on July 27, 2021. Because the rollout wasn't atomic, instances still running old code kept polling the modified table, hit the missing column and crashed until they were replaced. deno.land was restored early by redirecting to backup Cloudflare Workers, and no data was lost. Staging logs had shown the failures without failing tests or triggering alarms, so new staging alerts were added.
- Introducing Postgres Query Insights in ClickHouse Cloud
ClickHouse mediumAdept
Postgres Query Insights, now in preview for ClickHouse Cloud Managed Postgres, ranks every normalized query pattern by impact and aggregates per-execution counters (CPU, cache vs disk reads, temp spills, unlaunched parallel workers, WAL) to explain why a pattern is slow. A worked example traces a p99 regression to a sort spilling to disk, confirmed with EXPLAIN (ANALYZE, BUFFERS) and fixed with an index or work_mem tuning. Telemetry comes from pg_stat_ch, an Apache 2.0 extension that normalizes literals at parse-analyze time so values and PII never leave the database. It enqueues raw per-statement events via a non-blocking try-lock on a shared-memory ring buffer at about 3% overhead, dropping events under pressure rather than back-pressuring Postgres.
- Incident Report: December 8th, 2025
Railway mediumAdeptA schema migration adding a nullable column to a ~1 billion row PostgreSQL table stalled behind locks held by a long-running query. Waiting connections piled up until PgBouncer exceeded the database connection limit, so backend replicas failed health checks and dropped out of rotation, taking down the dashboard, CLI, login, GitHub deploys and API for about eight minutes. Running deployments stayed up. Railway plans to raise database connection limits, reconfigure PgBouncer to fit within them, and fix the long-running query.
- September 23 incident update
Deno easyNoviceA 35-minute outage on September 23, 2021 took down Deno Deploy projects, deno.land/x and /std module downloads, the dashboard and GitHub integration. It was caused by an unexpected Google Cloud Platform maintenance event on the primary Postgres database, during which HA failover to standby replicas is not possible. The database finished maintenance in an unknown failure state and recovered only after an automatic restart, with no data lost. Scheduled database maintenance has been halted while Deno works with GCP on the root cause and on making services resilient to primary database failures.
- Battling database performance
incident.io mediumAdeptIntermittent API timeouts at incident.io over two weeks traced back to requests blocking on Go's database/sql client-side connection pool, with no single slow query or pool to blame. The team shipped 24 changes along the way. These included materialised views, new indexes, query rewrites, a one-second lock timeout on transactions, and moving Slack webhook handling onto PubSub. They also built per-operation tracking of connection-hold time using an ngrok/sqlmw middleware and context counters that avoid double-counting inside transactions. The root cause turned out to be an unnecessary transaction wrapped around every Slack modal submission. Many short transactions added together had exhausted the pools, and removing it ended the timeouts.