ASP.NET Core API backend memory not clearing
Im writing a REST API for a backend server system, where the backend carries out mySQL calls, im currently doing a test run on the backend with about 1k requests using Parallel.For and the RAM usage shoots from 60mb to 150mb and never goes down
i posted images of the Controller Endpoint and the Database interaction
11 Replies
Memory is really hard to debug/diagnose, and purely from what you've said does not necessarily imply a leak
In many cases, server GC will not run until there’s memory pressure to do so. This will look like ballooning, etc.
Also the asp GC algorithm just keeps hold of a lot more memory than the regular algorithm
Yup
So do I just not fix it or
Cause my pc has 80gb ram
You haven't shown that there is anything to fix
But I'm not sure abt the server it will run on
I just need it to clear out memory after it's
That's not how the runtime works
“Clear out the memory”…
I mean, you can run a GC.Collect() if you want.
I think, you can use async/await.
for it.