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
Envelopes with oversized attachments getting stuck in __processing (Possible regression) #3804
On macOS, the following code results in a java.net.SocketException: Socket closed exception when processing the envelope:
.UseSentry(options =>{// All the standard optionsconstintmb=1024*1024;options.MaxAttachmentSize=80*mb;options.SetBeforeSend((e,h)=>{varrandom=newRandom();varbyteArray=newbyte[20*mb];random.NextBytes(byteArray);h.AddAttachment(byteArray,$"twentymb.bin");returne;});}
Additionally, the envelope getting stuck in the __processing directory and preventing other envelopes from being sent. I think that is a problem in the .NET SDK and possibly a regression of:
When attempting to send these envelopes, because the server is simply disconnecting, the client SDK is executing this logic (try again when the network is "back online"):
HttpRequestException or WebException or IOException or SocketException=>true,
_ =>false
};
In the case of Broken Pipe or Connection Reset by Peer socket exceptions, we should probably assume the connection was reset intentionally by the remote host and fail/discard these envelopes.
Activity
jamescrosswell commentedon Jan 28, 2025
When attempting to send these envelopes, because the server is simply disconnecting, the client SDK is executing this logic (try again when the network is "back online"):
sentry-dotnet/src/Sentry/Internal/Http/CachingTransport.cs
Lines 349 to 358 in f2ca96c
Instead of this logic (fail and log):
sentry-dotnet/src/Sentry/Internal/Http/CachingTransport.cs
Lines 364 to 368 in f2ca96c
The
IsNetworkErrormethod is overly simplistic:sentry-dotnet/src/Sentry/Internal/Http/CachingTransport.cs
Lines 303 to 308 in f2ca96c
In the case of Broken Pipe or Connection Reset by Peer socket exceptions, we should probably assume the connection was reset intentionally by the remote host and fail/discard these envelopes.