In our case tweaking the thread pool seems to have solved the issue:
ThreadPool.SetMaxThreads(32_767, 2_000);
ThreadPool.SetMinThreads(1_000, 1_000);
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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
The above is the exception that is generated over and over again. I am again wondering what this information might tell me...?
Thanks in advance!
In our case tweaking the thread pool seems to have solved the issue:
ThreadPool.SetMaxThreads(32_767, 2_000);
ThreadPool.SetMinThreads(1_000, 1_000);
Asp.net core does not scale well with long running sync code. There is only one process thread per cpu, and it looks like you are using them up.
Your actions can run the sync code with Task.Run() and become async. This will allow the process threads to do more work.