Submit a ticketCall us
Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > SAM Log Parser template returns Out of Memory exception if log files exceed CPU and memory limits on polling machine

SAM Log Parser template returns Out of Memory exception if log files exceed CPU and memory limits on polling machine

Updated October 2, 2018 

Overview

When using the Log Parser (PowerShell) template, Out of Memory exceptions can occur if large log files created by third-party applications exceed CPU and memory resources on the machine that runs polling jobs. 

Environment

 

  • SAM 6.2.x — 6.6.1

Cause

The Log Parser (PowerShell) template searches log files created by third-party applications to find specific text, as defined by the user. If a third-party application encounters issues and Log Parser finds the phrase in log files, SAM switches the component to a Down state.

The larger the log file, the more CPU and memory resources are required to analyze it which can exceed the limits of the machine that runs polling jobs. Here is an example message that may appear when file size exceeds polling limits: 

Test Failed with 'Down' Status on Servername.

Output===========================

Exception of type 'SystemOutOfMemoryException' was thrown.

Error:=======================select:string: Exception of types 'SystemOutOfMemoryException'--

A similar exception error occurs when a Windows PowerShell Monitor runs out of memory for a PowerShell script

OutOfMem.jpg

Resolution

  • Host the polling engine on a 64-bit system. 64-bit machines have better capabilities in terms of memory management so they can process larger files (for example, over 1 GB) than 32-bit machines. 
  • Consider agent vs. agentless polling. Agents provide richer data streams while adding load to the application, while agentless polling can only pull limited data (based on the API and permissions) but can isolate the load to an external resource and do not impact the application as severely.
 
Last modified

Tags

Classifications

Public