Back ForwardHow to monitor Storage Stream operations (PEGA0004 alert)

Benefits

Values of the Storage Stream column (pzPVStream) may require a large number of bytes of storage, and extracting or updating a property value from this column requires that the entire value be transmitted from the PegaRULES database to the server. Accordingly, careful design to minimize the number of Storage Stream operations can improve performance significantly.

Process Commander includes two alerts that provide information on Storage Stream operations:

PEGA004 Alert

The system adds a line to the Alert log when the Process Commander server requests a very large volume of data from the Storage Stream columns of the PegaRULES database. The line includes this identifier:

PEGA0004 Number of bytes received from the database has exceeded threshold.

Two threshold values are provided: one for warnings and one that causes a fatal error. By default, the warning threshold is enabled with a value of 50 megabytes; Storage Stream values larger than 50MB cause the warning to appear in the Alert log. (By default, the fatal threshold is disabled.)

NoteData returned from columns other than the pzPVStream column does not count towards the threshold limits.

NoteDuring upload of a ZIP archive, this alert setting is bypassed by design.

Caution Building initial indexes for the Advanced Search facility (accomplished through the System Management application) search naturally requires reading every rule, data instance, or work object. In some cases, a PEGA0004 alert threshold (alerts/database/interactionByteThreshold/errorMB) can cause the indexing process to fail before completing. Before building initial indexes on a new installation, make sure no value is set for the errorMB setting.

Changing defaults

1. Edit the prconfig.xml file to enable the interactionByteThreshold feature and set cutoff values of the warnMB element in megabytes and a higher value for the errorMB element. Set value="0" for the errorMB element or warnMB to indicate no limit. If you omit the warnMB line, the default value for warnMB is 50MB.

<env name="alerts/database/interactionByteThreshold/enabled"      value="true"/>
<env name="alerts/database/interactionByteThreshold/warnMB"
     value="50"/>
<env name="alerts/database/interactionByteThreshold/errorMB"
     value="100"/>

2. Recommended values for warnMB and errorMB are 50 and 100 respectively, though you can use higher or lower thresholds.

3. Undeploy and redeploy the server to make the prconfig.xml file changes effective.

4. Monitor the Alert log for PEGA0004 alerts. Each PEGA004 alert line contains values for three performance statistics, identified by a property name (in the Log-Usage class). These may aid in diagnosing and addressing the issue:

6. Monitor the Pega log for stack trace exceptions from the class:

com.pega.pegarules.engine.database.DatabaseImpl

If the amount of data returned from Storage Stream elements (after any needed decompression of the Storage Stream) exceeds the warnMB limit, the entry has an ALERT severity and appears in the Alert log, with a Java stack trace.

If the errorMB limit is exceeded, the entry has an ERROR severity, and the activity containing the database request ends.

Each log entry identifies the Requestor ID, the operator, and the currently executing activity.

Enhancing the application

Where possible, research reported exceptions and modify the application rules to eliminate them. These strategies may be appropriate, depending on the situation:

PDN Articles

For additional examples and explanation of these facilities, consult the Pega Developer Network PDNarticles:

Definitionsexposed property, Pega log, PegaRULES database,Storage Stream
Related topicsHow to detect lengthy PegaRULES database operations
Working with the PegaRULES database

Understanding alerts

UpSysAdmin category