Skip to main content

What can I do when my event payload is too large?

Issue

My events are dropped because they are too large, and I want to reduce their size so Sentry accepts them.

Applies To

  • All SaaS Customers

  • Event Ingestion

Resolution

"Too large" means your event exceeds Sentry's payload size limits, so Sentry drops it and returns a 413 Payload Too Large response. Sentry rejects an event that exceeds 200KB compressed or 1MB decompressed. Individual fields, such as extra data, contexts, and HTTP bodies, have their own limits and are trimmed when they exceed them.

To reduce your event size:

  1. Identify the large data. Common causes are big HTTP request or response bodies, large extra or context data, and application state.

  2. Trim that data before attaching it to the event, for example in beforeSend.

  3. Keep values within Sentry's per-field limits.

  4. For large supplementary data, use attachments instead of embedding it in the event. Attachments consume their own quota.

For exact limits, see the size limits documentation and the variable size limits. To attach extra data correctly, see enriching events.

Did this answer your question?