I have a memory problem in our webapp when loading a bit of data into a pivotview/grid (~20k/30k rows). The problem is not really that the usage is too high or anything, but rather that it is not getting freed or released after waiting even 30mins+, when having already left the page or even closed the browser. After revisting the page and loading the data again, the memory gets even a bit higher, though not doubled and after that it does not get higher again which I'm finding a bit strange. Does aynone already have a clue what this could be and how this is prevented usually?
What tech we used to build: To develop our webapp, we utilized Syncfusion Blazor.Our application is server-side and we used .net6,however I don't think any of this has relevance.
I can't provide the code of the specific .razor page because that would be too much but I can explain it. We don't use any component that needs to be disposed or closed specifically. It is a simple page with some UI elements to force the user to make a selection for dates and a couple of other parameters which then get sent OnButtonClick to a controller that loads the data for the customer using HttpClient. The loaded data gets a bit transformed and aggregated for the pivot grid and thats it.
What do I have to do to release all of the memory, as if the page and loading has never been done, when the user leaves the page or closes his browser.
I read that this is done by the GC and you can call the GC automatically but it is not recommended.
You are right in avoiding direct calls to the GC, and I suspect even calling the GC in this case won't help you.
Unless you're doing some specific coding, the server has no idea the browser has left the page or even closed.
I suspect you have some caching configured. Could be at the data layer (datasets, other in-memory data representations), ASP.NET/Blazor may be caching html content it sent, there may be controls you're using on the page that cache something.
You say the memory frees after 30 minutes or so - is that consistent? If so that's a configuration you can go looking for.
They say the two hardest things in Computer Science is naming things and caching!