Closed danmoseley closed 6 years ago
@BinaryPatrick hello, I don't know, let's move this to the ASP.NET repo. If you want to investigate yourself, you'll want to look at https://github.com/Microsoft/perfview
cc @sebastienros
Also, I have tested this with <ServerGarbageCollection>false</ServerGarbageCollection>
and it does not affect the memory consumption. Even after I stop the requests, the memory usage remains until I kill the webhost.
@BinaryPatrick We do it all day long, with much more complex applications, and we don't see this behavior. I even made a web app and article to show how everything works fine https://github.com/sebastienros/memoryleak
Can you check Console logging is disabled, or set the appsettings.json
to Error only? It's missing in the current empty templates.
Upgrading to ASP.Net Core 2.1.3 seems to have resolved the issue.
Closing for now. If new info comes up, please let us know.
I get this particular problem too. Happens when using containers - in dotnet core 2.1 or 2.2.
2.0 doesn't seem to have the problem.
@prefabpanda I suggest opening a new issue with a link back,so this isn't overlooked. You might also try 3.0 preview 5.
I'm seeing this problem in aspnet core 2.2, not using containers. I look at the Diagnostic Tools in VS2019 and GC never gets called throughout the lifetime of the application. However, I do see GC being called in an ASP.NET 4.5 project.
From @BinaryPatrick on September 4, 2018 18:4
An application running under a 15-25 requests per second load exhibits an endlessly growing memory footprint.
At first I thought I must have a memory leak, but when I run
dotnet new webapi
, compile the code using the release flag, and run it usingdotnet webapi.dll
, I get the same result.I generated a load of ~20 GET requests a second to https://localhost:5001/api/values and after 10 minutes, the memory usage is up to 800Mb and growing.
This is with the stock asp.net webapi template. Is this the expected memory usage?
Copied from original issue: dotnet/corefx#32100