You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash-report limit count seq-scans sentry_eventattachment and saturates Postgres #131176
Set a finite "store crash reports" limit (for example 20 per issue).
Have a busy issue with a huge number of normal attachments and only a few crash dumps.
Keep sending crash dumps for that issue.
Expected Result
Sentry asks "does this issue already have enough crash dumps?" only until the limit is hit, then remembers the answer. Each check should be a tiny index lookup.
That is what #15798 describes. The check is get_stored_crashreports in src/sentry/event_manager.py.
Actual Result
Sentry forgets the answer after 24 hours and asks again on every crash dump. Postgres answers by reading the whole attachments table, because there is no index on (group_id, type).
On a 4 vCPU database this filled the CPU (about 18% to 98%). One check took 2.6 seconds. Restarting Postgres did not help. The plan flipped back and forth earlier in the week, so this was a bad query plan, not a traffic spike.
Workaround that fixed it:
CREATEINDEXCONCURRENTLY sentry_eventattachment_group_id_type
ON sentry_eventattachment (group_id, type);
The same check then took 0.04 ms, and CPU fell immediately. The check still runs every time; the index only makes it cheap.
Product Area
Ingestion and Filtering
Version
26.10.1
Suggested fix
Ship that (group_id, type) index in a migration.
When an issue is already at the cap, write the 24 hour cache again. Today it is written only the first time the cap is crossed, so it never comes back after it expires.
Activity
getsantry commentedon Nov 14, 2026
Assigning to @getsentry/support for routing ⏲️
linear-code commentedon Nov 14, 2026
ENG-9045