I have a Windows 2008 R2 server running on a VM machine. My .NET service is running on this server periodically querying WMI, for example:
SELECT ProcessId FROM Win32_Service WHERE ...
After a day or two WMIprvse takes up to 500M memory and WMI queries start getting out of memory exceptions.
This article seems to be talking about this issue: "http://support.microsoft.com/kb/958124"
I've seen other articles saying that Microsoft is aware of the problem and not going to issue a fix until the next major release. http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/256eb40c-d050-4278-a3d8-863e30db02a0
I'd appreciate any suggestions and insights on this.
Check out both the following KB articles,
KB981314 - The "Win32_Service" WMI class leaks memory in Windows Server 2008 R2 and in Windows 7 - http://support.microsoft.com/kb/981314/en-us?p=1
KB977357 - A memory leak issue occurs in the Windows Management
Instrumentation service on a computer that is running Windows Server
2008 R2 or Windows 7 - http://support.microsoft.com/kb/977357
...but also worth noting we are on Windows 2008 R2 with SP1 (file versions higher than those provided by both hotfixes) and we are still seeing some slow memory leak issues possibly from either WMIAPSRV.exe and/or TRUSTEDINSTALLER.exe.
We are going to open a support call, if we find anything relevant will post the answer.