MSSQL 2014: Always On monitoring script failed

Constantly getting the alert on multiple servers

Alert: MSSQL 2014: Always On monitoring script failed
Date and Time: 12/18/2017 6:31:40 PM
Log Name: Operations Manager
Source: Health Service Script
Event Number: 4202
Level: 1
Logging Computer: XXXXXXXXXXX
User: N/A
Description:
Management Group: XXXXXXX. Script: Main Module: AvailabilityGroupMonitoring.ps1 Version: 7.0.0.0 : Error occurred during Always On monitoring. Computer:XXXXXX Reason: Out of memory Position:572 Offset:22 Detailed error output: Out of memory

There is a known bug in the 7.0 MP’s for SQL that cause WMI to show out of memory errors when monitoring randomly. I have a case open with MS on this and they have confirmed the issue and it has been escalated to the product team. I would watch for an update to the MP coming out in the next few weeks.

3 Likes

Hello!

“Out of memory” errors indicate that SQL Server WMI Provider can’t cope with the current load using the default configuration. You can try a solution described here: https://social.technet.microsoft.com/Forums/en-US/03c5b2e5-efdb-4e9b-bf98-8f86f93ec2c2/mssql-monitoring-failed-with-event-id-4001-out-of-memory?forum=operationsmanagermgmtpacks. This solution has solved the “out of memory” issue in any known environment which had it before.

In the most recent release, SQL MP team presented a change to reduce the number of WMI request established by the MP, but it didn’t solve the “out of memory” problem in all environments where it had existed. It looks like the problem can’t be solved from the MP side.

1 Like

Which version of the SQL 2014 Always On MP do you have? Sounds like there could be a memory leak in the script it mentions. Or, if you correlate the time of the script failing vs SCOM perf data for memory on these servers, is there any sign that the server is running with high memory usage?

Microsoft SQL Server 2014 Always On (Monitoring) version 7.0.0.0 .there is no sign that the server is running with high memory usage during the time of alert

Thanks for this! I actually updated our SQL MPs yesterday and I’m seeing errors too :frowning: We’ll wait for the update!

Please let us know once you got the fix