How to prevent TIBCO BusinessEvents TEA Agent from running OutOfMemory

How to prevent TIBCO BusinessEvents TEA Agent from running OutOfMemory

book

Article ID: KB0084327

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.3.0 and above

Description

TIBCO BusinessEvents TEA Agent reports OutOfMemory exception.

Environment

TIBCO BusinessEvents 5.3.0 and above All supported operating system.

Resolution

The BE_MM_Schema file controls the retention-policies and metrics data. Try changing the purge settings in BE_MM_Schema file located in $BE_HOME\teagent\config\schema to something like the following.

-----------
<schema name="BE_MM">
    <retention-policies>
         <retention-policy type="fact" period="1" unit="DAY" purge-time-of-day="-1"  purge-frequency-period="86400000"/>
         <retention-policy type="BEMMCube/instancehealthhierarchy" period="4" unit="HOUR" purge-time-of-day="-1"  purge-frequency-period="3600000"/>
         <retention-policy type="BEMMCube/eventhealthhierarchy" period="4" unit="HOUR" purge-time-of-day="-1"  purge-frequency-period="3600000"/>
         <retention-policy type="BEMMCube/clusterhealthhierarchy" period="4" unit="HOUR" purge-time-of-day="-1"  purge-frequency-period="3600000"/>
         <retention-policy type="BEMMCube/rulehealthhierarchy" period="4" unit="HOUR" purge-time-of-day="-1"  purge-frequency-period="3600000"/>
         <retention-policy type="BEMMCube/inferencehealthhierarchy" period="4" unit="HOUR" purge-time-of-day="-1"  purge-frequency-period="3600000"/>
    </retention-policies>
-----------

The above policy will purge all records older than one day and the purge will happen every 24 hours. You can change the period to other values to purge data after x days/hours. Possible values for unit - WEEK, DAY, HOUR

Another option would be to increase the allocated memory.

Question : How to maintain metrics for a week ?
Answer :  A bit of a sizing exercise is required. One need to compute how much steady-state RAM it takes to hold a day's worth of data in memory and use 10x that number for max heap size for a week's retention.

Issue/Introduction

TIBCO BusinessEvents TEA Agent reports OutOfMemory exception.

Additional Information

BE Engineering