C#C
C#8mo ago
4 replies
dreadfullydistinct

BadHttpRequestException: Reading the request body timed out due to data arriving too slowly

I am seeing a few of these exceptions on my API I deployed to a VPS:

MessagePack.MessagePackSerializationException: Error occurred while reading from the stream.
 ---> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1ContentLengthMessageBody.ReadAsyncInternal(CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory`1 destination, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at MessagePack.MessagePackSerializer.DeserializeAsync[T](Stream stream, MessagePackSerializerOptions options, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MessagePack.MessagePackSerializer.DeserializeAsync[T](Stream stream, MessagePackSerializerOptions options, CancellationToken cancellationToken)
   at MessagePack.MessagePackSerializer.DeserializeObjectAsync[T](Stream stream, MessagePackSerializerOptions options, CancellationToken cancellationToken)
   at MessagePack.AspNetCoreMvcFormatter.MessagePackInputFormatter.ReadRequestBodyAsync(InputFormatterContext context)
   at DragaliaAPI.Infrastructure.Serialization.MessagePack.CustomMessagePackInputFormatter.ReadRequestBodyAsync(InputFormatterContext context) in /src/DragaliaAPI/DragaliaAPI/Infrastructure/Serialization/MessagePack/InputOutputFormatters.cs:line 52


I could just shrug it off as the user on the other end of the request having a poor internet connection, but it happened three times last night to two different people, so I’d at least like to briefly investigate - does anyone have any ideas what debugging steps I could take? There isn't anything from around this time period in the reverse proxy logs
Was this page helpful?