self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

Event data was getting dropped in relay

Open sree-warrier opened this issue 1 year ago • 3 comments

Self-Hosted Version

23.11.2

CPU Architecture

x86_64

Docker Version

na

Docker Compose Version

na

Steps to Reproduce

Events were getting dropped at the relay side also we were facing issue with envelope buffer size limit. Is there any setting at relay side to controlling the event size and payload under a event ?

How we can check the payload of a event coming to sentry, does we get a accumulated value of common errors with the size of a event with payload. We know that event size depends on the breadcrumbs and dependencies and other configuration setting of app.

How can restrict the size of data at relay side if an event payload i having more than a limit.

Expected Result

NA

Actual Result

NA

Event ID

NA

sree-warrier avatar Sep 20 '24 10:09 sree-warrier

The default envelope size is 50 MB (see https://docs.sentry.io/product/relay/options/#size-limits, config key is limits.max_envelope_size), this should be restricted on each SDK. The maximum buffer size for envelope is 1000 (config key is cache.envelope_buffer_size), so in total it's 1000 * 50 MB (= 50 GB stored in memory). But you might also want to look at the spooling config (https://docs.sentry.io/product/relay/options/#spooling)

Usually the problem is caused by either:

  1. relay having a hard time publishing that events to Kafka. Probably slow disk speed or low RAM.
  2. The event throughput is too high, if this is the case, you can spawn a few replica of the relay, but bear in mind you'll also need to increase your server (or VM) specs.

aldy505 avatar Sep 21 '24 01:09 aldy505

@aldy505 is there a way in UI or metric API to check per event payload size ?

sree-warrier avatar Sep 23 '24 18:09 sree-warrier

@aldy505 is there a way in UI or metric API to check per event payload size ?

@sree-warrier I don't think there is. Although there's this button that you can see when you browse errors or spans on the detailed view. Image

I don't know if that's the correct size of the event payload. I assume it's not though.

aldy505 avatar Oct 02 '24 06:10 aldy505

@aldy505 is there any configs we can set it at relay side to limit the payload size. Any event more that particular size will be dropped and shouldn't be processed. Was able to go through the size-limit docs of sentry, but unable to find the configs for those. If there are any configs do share.

sree-warrier avatar Oct 21 '24 05:10 sree-warrier

@aldy505 is there any configs we can set it at relay side to limit the payload size. Any event more that particular size will be dropped and shouldn't be processed. Was able to go through the size-limit docs of sentry, but unable to find the configs for those. If there are any configs do share.

@sree-warrier I got back from the Relay team, they said it's there on the size-limits.

Image

aldy505 avatar Oct 21 '24 10:10 aldy505

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Nov 12 '24 08:11 getsantry[bot]