Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry.Transport.Sender can use a lot of memory #773

Open
hkrutzer opened this issue Aug 19, 2024 · 3 comments
Open

Sentry.Transport.Sender can use a lot of memory #773

hkrutzer opened this issue Aug 19, 2024 · 3 comments

Comments

@hkrutzer
Copy link

hkrutzer commented Aug 19, 2024

Environment

v10.6.2

Steps to Reproduce

This is memory usage with our base config:

Image

In absolute terms it is not that much memory, but it can go up to around 20MB and often appears in our top 20 of processes using the most memory. Manually triggering a garbage collection on the process reduces it by a lot.

I enabled source maps, which took it up to this:

Image

and eventually caused our application to be OOM-killed.

The source map file is not that big:

Wrote 1412 files in 1.54 Mb to: _build/dev/lib/sentry/priv/sentry.map

Loading it manually with :erlang.binary_to_term:

iex(11)> byte_size(sourcemap)
1307912

I realise there are not many details in this issue but I'm not sure what to add. Please let me know what additional info you need.

@whatyouhide whatyouhide changed the title Sentry.Transport.Sender can use a lot of memory Sentry.Transport.Sender can use a lot of memory Aug 19, 2024
@whatyouhide
Copy link
Collaborator

Mh this is definitely an issue but yeah it could take a while to debug, I'll try to look into it.

@whatyouhide
Copy link
Collaborator

@hkrutzer what's your error throughput that you are reporting to Sentry here? The issue with source maps will be fixed in master soon, but 20MB can be quite high unless your throughput is high.

@hkrutzer
Copy link
Author

Not that high:

Image

(I'm assuming errors includes warnings, if not it might be 2 to 3 times as much, which is still not that high I would say).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants