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
Memory dump detection: dump file dropped because it's too big #4007
We could show something in the UI saying the dump file was too large. Or we could avoid sending the event altogether. But this means now the server could crash OOM and we have no event in Sentry at all. Which is probably even worse.
Hm, tricky. We can't get around the file size constraint.
About all I can think is that we could also provide an "OnLargeDumpCaptured" callback or something that users could implement to send/store the dump somewhere else (e.g. they could upload it to some cloud storage). It starts to make things more complex and less convenient, but I can't see any other way around it.
There's no way to make the dump file smaller? Configure how many references to keep around etc?
Not sure it's worth adding the callback. We do need to verify if we want to have that event being sent if the event is too large though. Do we know the dump file or it's streaming to disk or something?
// if this happens, hopefully there would be more information in the standard output from the process above
_options.LogError("Unexpected error creating memory dump. Use debug-level to see output of dotnet-gcdump.");
return;
}
_onDumpCollected(dumpFile);
So yeah, we know where the dump file is and could just let people know the location where it's been stored, if it's too big to add as an attachment. I imagine a lot of folks wouldn't have access to it in a production environment though.
So yeah, we know where the dump file is and could just let people know the location where it's been stored, if it's too big to add as an attachment. I imagine a lot of folks wouldn't have access to it in a production environment though.
But if we're doing this now we need to keep track and delete old files etc to avoid a disk filling up.
If we're not sending to Sentry, I would delete the dump file and log diag logger error about it.
If Sentry increases the size limit one would need to bump the SDK (and we'd need to amend the SDK limits though)
But if we're doing this now we need to keep track and delete old files etc to avoid a disk filling up.
I just added a new issue to cover that off.
In terms of how to capture large heap dumps, Sentry's docs on the subject suggest To add larger or more files, consider secondary storage options. If we did have an OnOversizedDump callback, is there any secondary storage we could use to dogfood this in the symbol collector? I think it would be fairly easy to add that callback.
In terms of how to capture large heap dumps, Sentry's docs on the subject suggest To add larger or more files, consider secondary storage options. If we did have an OnOversizedDump callback, is there any secondary storage we could use to dogfood this in the symbol collector? I think it would be fairly easy to add that callback.
We also got this feedback... which the callback could be a solution for.
Activity
jamescrosswell commentedon Feb 27, 2025
Hm, tricky. We can't get around the file size constraint.
About all I can think is that we could also provide an "OnLargeDumpCaptured" callback or something that users could implement to send/store the dump somewhere else (e.g. they could upload it to some cloud storage). It starts to make things more complex and less convenient, but I can't see any other way around it.
Thoughts?
bruno-garcia commentedon Feb 27, 2025
There's no way to make the dump file smaller? Configure how many references to keep around etc?
Not sure it's worth adding the callback. We do need to verify if we want to have that event being sent if the event is too large though. Do we know the dump file or it's streaming to disk or something?
jamescrosswell commentedon Feb 27, 2025
dotnet-gcdump writes the file to disk, then we capture a Sentry event and add the dump as an attachment:
sentry-dotnet/src/Sentry/Internal/MemoryMonitor.cs
Lines 93 to 103 in 3fde00a
So yeah, we know where the dump file is and could just let people know the location where it's been stored, if it's too big to add as an attachment. I imagine a lot of folks wouldn't have access to it in a production environment though.
bruno-garcia commentedon Feb 27, 2025
But if we're doing this now we need to keep track and delete old files etc to avoid a disk filling up.
If we're not sending to Sentry, I would delete the dump file and log diag logger error about it.
If Sentry increases the size limit one would need to bump the SDK (and we'd need to amend the SDK limits though)
[-]Memory dump too big[/-][+]Memory dump detection: dump file dropped because it's too big[/+]jamescrosswell commentedon Feb 27, 2025
I just added a new issue to cover that off.
In terms of how to capture large heap dumps, Sentry's docs on the subject suggest
To add larger or more files, consider secondary storage options.If we did have anOnOversizedDumpcallback, is there any secondary storage we could use to dogfood this in the symbol collector? I think it would be fairly easy to add that callback.bruno-garcia commentedon Feb 28, 2025
Relates to:
bruno-garcia commentedon Mar 5, 2025
Also relates to:
bruno-garcia commentedon Apr 24, 2025
Relates to:
jamescrosswell commentedon May 18, 2026
We also got this feedback... which the callback could be a solution for.