I have a .Net core 2.2 console app, which uses EF core internally for db calls. It runs as scheduled service using topshelf and quartz.net. I observe memory usage of this console keeps on increasing until it reaches to 90% of server RAM, i don't know if it can keep on taking more RAM than that as once it reaches to that margin i generally shut it down and restart again.
I am unable to share code here as project is vast and unable to narrow down what might cause this. Though I have inspected code enough, and there is nothing in code which can make app keep on holding to older memories/objects.
I also inspected dump file using one of dump analyzing tool and see around 50% of memory is used by string values(which all loose scope quick but are large data) and for rest; most of memory is used by EF core(change tracker to be precise). I am doing large json creation in loop for list of db rows, but all that shall be freed/collected up sometime as those are all part of List of managed objects and loop looses its scope quickly.
Did anyone face similar issue where in a scheduled .net core 2.2 app doesn't seem to have GC collection fired or memory not being freed in general when left for running for few days, considering code seems fine for memory leakage.