OpsMgr 2007 Solution: Management Pack scripts fail and consume large amounts of memory

image

Here's an issue that was sent to me courtesy of a couple different Support Engineers in our Operations Manager group.  Apparently we're getting a call or two on this and they thought it might help if we got the word out.

Issue: You may notice that on certain machines running the OpsMgr agent, cscripts fail and then consume large amounts of memory (e.g. 100MB or more).  This can cause virtual memory errors such as this:

Event Type: Warning
Event Source: Health Service Modules
Event ID: 21402
Description: Forced to terminate the following process started at <time> because it ran past the configured timeout 120 seconds.

Command executed: "C:\WINDOWS\system32\cscript.exe" //nologo "C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 22\1662\AD_Database_and_Log.vbs" false {24FC5C13-D587-5C71-820F-D146FFDF4917} 0.2 500000 200000 0.05
Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 22\1662\

One or more workflows were affected by this.  

Cause: This can occur in some circumstances if the computer in question is using a version of Windows Script prior to 5.7.

Resolution: Apply the Windows Script 5.7 or later update.  Windows Script 5.7 can be downloaded here:

https://www.microsoft.com/downloads/details.aspx?FamilyID=f00cb8c0-32e9-411d-a896-f2cd5ef21eb4&DisplayLang=en

Note: A special thanks to Shamir Abdul Aziz and Ted Sendler for their work on this.

J.C. Hornbeck | Manageability Knowledge Engineer