I ran into an issue with my API generating a huge CPU load of lsass.exe The environment :
- Windows Server 2016
- .NET Core 2.2 (aslo tested with .NET Core 3.0)
In order to investigate it, I created a new ASP.NET Core website using the default template (dotnet new web
). I updated Kestrel configuration to look like this :
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel((context, options) =>
{
options.AddServerHeader = false;
options.Listen(IPAddress.Any, 5001, listenOptions =>
{
listenOptions.UseHttps(StoreName.My, "*.mycertificate.domain", false, StoreLocation.LocalMachine);
});
})
.UseStartup<Startup>();
});
Alongisde this website, i created a load test using JMeter in order to hit the website with this load :
When running the test browsing the homepage of the website, the result is having the lsass.exe process to heavily use the CPU close the 100%.
I ran others tests using those configurations and the result is still the same
- Kestrel using different ways to load the certificate
- IIS using InProcess website with a https binding on the certificate
- HTTP.sys
Any ideas on how to configure properly https on aspnet-core to create a heavy load API ? Thanks for your help