AI NewsInfrastructureAnnouncement
Three Sentry GitLab bugs turned one webhook into millions of RPC calls
Sentry's shared Control RPC sat at its 256-pod ceiling for hours. Three bugs in the GitLab integration lined up at once.

Why it mattersAn integration that runs fine on normal data can still fail on one shared record with thousands of tenants. Add the fan-out cap and the per-tenant guard before the shared record collects them.
A webhook that used to fire once can send millions of calls. One old bug, one recent fix, and one N-squared lookup lined up.
Sentry engineer Gabriel Villalobos wrote up the postmortem. The company's Control RPC runs in one place. Every Sentry region shares it. That deployment sat pinned at its 256-pod ceiling for hours, up from a baseline of about 150. The method integrations.get_organization_integrations spiked to 28.64 million calls an hour, far above every other method on the chart.
The three bugs
Four years ago, Sentry released a feature. A user could include every GitLab group in one integration by leaving the group path empty. On hosted GitLab at https://gitlab.com, that empty value also grouped every unrelated installation together. One shared Integration record quietly collected more than 2,000 installations over four years.
In mid-September, another team landed a fix to the webhook setup path. The fix made sure webhook triggers were configured for every project under a parent integration. For the shared record, that meant webhook triggers for every project under all 2,000 installations.
The third bug was in the assignment sync code. It looked up installations by their parent integration, once for every single installation. Each lookup crossed the silo boundary as an RPC call. On the shared record, one webhook became about 2,000 RPC calls.
When the three stacked
The problem showed up on the weekly traffic peak, Tuesday evening to Thursday afternoon. External traffic was up about two times, and the Control RPC deployment scaled about eight times. The autoscaler was doing the right thing. The deployment just could not keep up with its own fan-out.
A teammate on the source code management team had already landed a patch when Villalobos started writing. The deployment replicas dropped from 255 to near the 32-pod minimum. Over the following week, the average fell from about 150 pods to 42, a 72 percent cut.
A single integration record with thousands of tenants in it is a special class of risk. Every write against it fires work for everyone who shares it. Every read with no limit walks the whole list. The fan-out is invisible from one caller's point of view. The webhook sender sees one event. The shared record sees the full multiplication. Sentry's Control RPC runs cross-silo, so each hop also costs a network round trip. The fix looks like one of three options. Split the shared record. Cap the fan-out per webhook. Or cache the parent-to-children lookup so each sync is one call instead of 2,000.
Postmortems like this one are useful because the three bugs on their own were cheap. The grouping bug sat for four years with no symptoms. The webhook fix made the integration more correct. The N-squared lookup was cheap under any normal load. Only the three together produced the spike. And only a chart of one method against the others made it visible.
Source
How one quadratic webhook handler pinned our autoscaler at its ceiling, Gabriel Villalobos, Sentry.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.


