Back ForwardHow to detect when a database query length has exceeded a specified threshold (PEGA0033 alert)

Alert log message

5.5 The PEGA0033 alert is generated if your PRPC system sends to the PegaRULES database (or to another SQL database) a SQL query with length in bytes greater than a specified threshold.

Such large SQL queries expand the size of database cache memory and increase memory and CPU resource costs. Here is an example of a long query:

Database query length exceeded the defined threshold value of 2,500: 5,151 SQL:  SELECT pzInsKey as "pxInsHandle",  pyClassName AS "pyClassName"  ,  pyFlowType AS "pyFlowType"  ,  pyLabel AS "pyLabel"  ,  pyRuleSet AS "pyRuleSet"  ,  pyRuleSetVersion AS "pyRuleSetVersion"  ,  pyCategory AS "pyCategory"  ,  pyCanStartInteractively AS "pyCanStartInteractively"  ,  pyCanCreateWorkObject AS "pyCanCreateWorkObject"  ,  pyStreamName AS "pyStreamName"  ,  pyMethodStatus AS …

Modifying the alert settings

By default, the alert is disabled. When enabled, it has a threshold of 2,500 bytes. You can modify the setting in the prconfig.xml file as follows:

  1. Open the prconfig.xml file and update this alerts section:

<env name="alerts/database/querylength/enabled" value="false" />
<env name="alerts/database/querylength/threshold" value="2500" />

  1. To turn on the alert, change the enabled value to "true."
  2. Set the threshold value to a positive integer identifying the maximum number of bytes.
  3. Stop and restart the server.

As an alternative to the prconfig.xml file, you can use Dynamic System Settings to configure your application.
See How to create or update a prconfig setting.

Example

For an example, see PDN article Understanding the PEGA0033 alert.

Definitions alert log, prconfig.xml file
Related topics Understanding alerts
Working with the PegaRULES database

UpSysAdmin category