I am hosting a .NET 4.6.1 MVC app in a web app in Azure and collecting telemetry data using Application Insights. Over time memory usage of the app increases to a point where service degrades and a restart is required.
I am currently using version 2.22.0 of ApplicationInsights and the collection of this data is automatic configured by ApplicationInsights.config
I have taken snapshots of the heap memory usage while debugging in visual studio and can see that the memory increase is being caused by:
- String (The hierarchy of this looks like it includes the below 2)
- ConcurrentDictionary+Node<String, Boolean>
- ConcurrentDictionary+Node<String, Boolean>[]
I'm out my depth here and not sure how to solve this problem?
I've noticed that a change to concurrent dictionary was made here but not sure if this is related?