aspnetcore: ASP.NET Core - Performance - Load Testing issue Microsoft.AspNetCore.Server.Kestrel[13] Connection id "xyz", Request id "abc" An unhandled exception was thrown by the application.
Hello,
testing an ASP.NET Core API under load gives following error:
**fail:** _Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLTTTNCMN23D", Request id "0HLTTTNCMN23D:00000002": An unhandled exception was thrown by the application.
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected end of request content._
Load test settings: 4000 concurrent requests coming each second for a duration of 1 minute
I am using JMeter for load testing. This issue does not arise for 2000 concurrent users.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 33 (14 by maintainers)
This stack trace implies there’s an issue in Kestrel rather than the form reader.
The
BadHttpRequestException: Unexpected end of request contentfrom the original post points to possibly the same place, though the BadHttpRequestException wouldn’t have been thrown if you hit the other exception given above. https://github.com/dotnet/aspnetcore/blob/e3d3da3546aa2085aa39520f3c302d0672e5bab8/src/Servers/Kestrel/Core/src/Internal/Http/Http1ContentLengthMessageBody.cs#L91-L95ResetReadingStateis called for timeouts, early end of bodies, and cancellation tokens. It doesn’t look like any cancellation tokens are used by default in this call stack. Early end of body matches the other callstack. If you are able to reproduce this with Debug or Trace level logs it might help narrow it down.