I have a backend process that is called periodically by a service. It checks a directory to see if there are any messages to handle. QA tells me that if the service is running, even if it isn't processing any messages, it causes gradual memory usage increase. An almost identical service (from which I copied my service) doesn't cause memory usage to increase.
I'm hoping to be able to see the memory usage increase when I run the service on my local machine, so I can comment out the various processes one at a time to figure out where the leakage is occurring, but I'm not sure how to do it. There is a single entry method that the process uses, so I'm hoping if I take my snapshot and the beginning and end of the method, I should be able to tell if there was anything left open.
What could I use to gather this information in a way that would tell me if memory leakage was occuring inside a particular method?
The CLR components and garbage collection differs according to the hardware and system resources (optimization stuff), so emulating the exact memory behavior happening on a server on your PC is not a simple task.
I suggest you use a .NET CLR memory profiling software by installing it on the production system.
You can also submit the code of that 'particular' method here so the experts can help you more and point out any code that is causing the memory leaks.
I suggest you use a .NET CLR memory profiling software by installing it on the production system.
You can also submit the code of that 'particular' method here so the experts can help you more and point out any code that is causing the memory leaks.