-
Notifications
You must be signed in to change notification settings - Fork 527
[Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException Reading the request body timed out due to data arriving too slowly. See MinRequestBodyDataRate. #2855
Comments
None of the above, it's data coming from the client that's under the minimum rate. |
@blowdart Thanks for your prompt reply. |
I also have such issue on GKE container 2.1.401 SDK; using LibUv transport - cause socket consume a lot CPU
or
but kestrel return 200 OK |
You could lower the minimum request rate, but it sounds like the client isn't sending fast enough, I'd examine that first, if you're just sending a single, non-chunked request it should be fine, but there could be something weird going on in the network somewhere. |
I try that code in controller
but it's not help |
@marfenij This is most likely an issue with slowness in the client. I don't necessarily recommend doing this in production unless you restrict access to only trusted clients, but if you set the MinDataRates to null do you still see these issues? |
@halter73 thank you, I think that is client (mobile iOS) or network problem, but no idea how to get facts. |
Closing this. |
@marfenij Did you try this solution? I have similar situation of mobile clients interacting with the server. |
This just started occurring on our server, and it's also from mobile traffic. |
@vmachacek @wonea Have you tried decreasing the MinRequestBodyDataRate or increasing the graced period? If the issue is with slow/high-latency clients, that could help. Another thing to watch out is threadpool starvation. That can sometimes lead to false-positives in the min data rate detection logic. |
Hi,
on a HTTP POST, our kestrel server had the following problem.
I would like to know the whether the problem is due to OS slowness, the communication between OS and kestrel OR kestrel itself?
2018-08-27 08:25:11,172 [72] [ERROR] [ReadAPI.startup] - Subject=[Caraibes.Read.WebApi] Unhandled exception in Caraibes, Body=Unhandled exception occured. ContextId: '29790307-1a1f-45ad-a12c-1e250ab093c0'
Exception: [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.BadHttpRequestException.Throw(RequestRejectionReason reason)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
at System.IO.Pipelines.Pipe.GetReadAsyncResult()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Toolbox.WebApi.Helpers.Middlewares.HttpRequestResponseLoggingMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Toolbox.WebApi.Helpers.Middlewares.HttpRequestResponseLoggingMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()], Detail=
The text was updated successfully, but these errors were encountered: