question

MikeKoleno-5714 avatar image
0 Votes"
MikeKoleno-5714 asked ZhiLv-MSFT commented

BadHttpRequestException and Performance Problems in .NET Core Web API


I am running a fairly standard .NET Core Web API running in Google App Engine and while my API controllers are naturally asynchronous, my business layer runs synchronously. I am using EF with a MySQL database and anytime my API takes on more than 10+ requests at once, I start to see this exception everywhere and my API performance grinds to a halt.

I have a beefing PaaS configurations with elasticity enabled for both of my App Engine and Cloud SQL configurations. I know I could save some performance by turning my business tier into async calls but should my API be grinding to halt with such low volume? What else could I be doing wrong?

Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Unexpected end of request content.

Thanks in advance!

dotnet-aspnet-core-webapi
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MikeKoleno-5714,

Whether this error only occurs when you running the application in Google App Engine? Is it disappearing in the local environment?

Besides, can you tell us more detail information about the API method: the Asp.net core version, what the API does, is there have the high CPU usage/request limit issue? And you could try to use Fiddler to trace the API request to see if there has any detailed error message?

If possible, I suggest you could post the related code or create a sample and then tell us the detailed steps to reproduce the problem.

0 Votes 0 ·

0 Answers