What is the best way to stop memory usage from increasing over time. I assume its because of the cache variable and the fact that i run auto refreshes etc ?
I have read on this forum that i need to null out my cache variables and then run a [gc]::collect()
but this is not working … the memory usage just keeps going up.
What is the correct way to deal with this in UD ?
Any advice ?
EDIT: Seems that garbage collection is helping . . .i think. would still like to know the correct procedure. I also see CPU usage at 100% when the endpoint(s) refresh . . .
Here is what i am doing - this is all just proof of concept at the moment - I’m creating a dashboard for various Exchange Metrics ( Queue sizes, Database availability groups so far )
I’m reading in CSV files with the raw data as the Exchange server(s) I’m querying is remote and not reachable by the UD server.
I find that editing the powershell script and saving ( which triggers the -Autoreload of the whole script ) causes the memory to increase a lot faster than just sitting there auto refreshing the columns etc…
I cannot paste the code here as it doesn’t render properly. Can I mail it to you ?