We have a .NET application that uses WMI to gather a wide range of information on machines throughout a network, such as reading the Win32_NTLogEvent to see if Symantec Antivirus has written anything. The queries work fine, but after repeatedly running a WMI query "Generic Failure" errors will start coming back. This happens very consistently after approx. 125 calls. Rebooting the machine that we are running the WMI query against, always fixes the error... that is until the next 125 queries are run.
It appears that the repository is fine and we can't locate any log file size issues.
More Info - Ran WMIDiag after getting the error and found -
25607 13:55:38 (1) !! ERROR: WMI ENUMERATION operation errors reported: 2 ERROR(S)!
25608 13:55:38 (0) ** - ROOT/CIMV2, SubClassesOf, '*', 0x80041006 - (WBEM_E_OUT_OF_MEMORY) Not enough memory for the operation.
25609 13:55:38 (0) ** MOF Registration: 'C:\WINNT\SYSTEM32\WBEM\SNMPREG.MOF ' 25610 13:55:38 (0) ** - Root/CIMv2, InstancesOf, 'Win32_PerfFormattedData_PerfProc_Thread', 0x8007000E - Not enough storage is available to complete this operation..
25611 13:55:38 (0) ** MOF Registration: 'C:\WINDOWS\SYSTEM32\WBEM\WMI.MOF'
Anyone ever see this? Ideas?