SentryMichael WarkentinIncident / postmortem
How a broken release name overloaded our symbolication database
Summary
Sentry’s symbolication database had grown uncontrollably because a few releases with broken names—like the literal string VERCEL_GIT_COMMIT_SHA—accumulated tens of millions of URL index rows. A single unbounded URL lookup against the worst release took 7.4 minutes uncached and always timed out, then was retried twice, multiplying load. The fix capped a single URL lookup at scanning 1,000,000 rows, so lookups on huge releases stop early instead of running until killed and retried. CPU usage on the busiest database host dropped from 76% to 19%, and Symbolicator timeouts fell from 3,250 per hour to 80. Additional changes included splitting a heavy join, stopping date rewrites on every index row, and turning off Postgres JIT compilation.
Context
Sentry’s symbolication database (Postgres 14) had grown uncontrollably because a few releases with broken names—like the literal string VERCEL_GIT_COMMIT_SHA—accumulated tens of millions of URL index rows. A single unbounded URL lookup against the worst release took 7.4 minutes uncached and always timed out, then was retried twice, multiplying load. Bigger hardware and extra indexes had not solved the problem.
Approach / What changed
Capped a single URL lookup at scanning 1,000,000 URL index rows, so lookups on huge releases stop early instead of running until killed and retried. Also split a heavy join into three single-table queries, stopped rewriting dates on every index row during bundle re-uploads, stopped indexing files named after their own debug ID, and turned off Postgres JIT compilation.
Takeaways
A single release with a broken name (like VERCEL_GIT_COMMIT_SHA) can accumulate tens of millions of URL index rows, because every build lands in the same release and generated file names make URL lookups impossible.
Capping the work a single query can do (1,000,000 rows scanned) cut database CPU from 76% to 19% and symbolication timeouts by 98%, where adding hardware had failed.
Turning off Postgres JIT compilation for the database cut latency per legacy release file lookup from 14.5 ms to 0.12 ms and busy sessions from about 7.5 to 0.06.
FAQ
What causes a release name like VERCEL_GIT_COMMIT_SHA?
A release named after a literal environment variable string (like VERCEL_GIT_COMMIT_SHA) means the variable was never expanded in the build config. Every deploy landed in the same release, and generated file names made URL lookups impossible, causing huge table growth.
How does the row budget fix unbounded lookups?
The row budget caps a single URL lookup at scanning 1,000,000 rows. Lookups on huge releases now stop early instead of running until killed and retried. The miss is cached, avoiding repeated work. About 0.5% of lookups hit the cap, but those few were driving roughly three-quarters of the CPU on the busiest host.
Why was Postgres JIT harmful for this workload?
Postgres JIT compiles expensive queries to machine code by default for queries with an estimated cost above 100,000. For one legacy release file lookup, compiling took longer than it saved every time. Turning JIT off cut latency per call from 14.5 ms to 0.12 ms and busy database sessions from about 7.5 to 0.06.
Source and freshness
- Source
- blog.sentry.io
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.