Forum Discussion
SamXion
Nov 12, 2021Copper Contributor
Why is my ASP.Net Web API piling up memory?
Hi everyone, I have a very simple MVC web api with a single controller that currently does nothing but returning a value. I am publishing it in VS2022 Preview 1 into a single file, so I get an .e...
- Nov 14, 2021If you're calling it ever 250ms, it's likely not quiet enough for the Garbage collector to fire up. And with 90mb, it likely isn't pushing enough memory pressure (that's still tiny) to force the Garbage collector.
Codenamejack
Nov 13, 2021Copper Contributor
Have you tried launching it without debugger? Maybe with dotnet run command. Is the behaviour same even then?
SamXion
Nov 15, 2021Copper Contributor
The VS publishing function is always compiling in Release mode so that cannot be it. Also, actually when running the API in debug mode, this memory piling does NOT occur. Oo