Detecting lengthy service operations

You can cause Pega Platform to add a line to the Alert log when a service operation or parse rule operation takes an unusually long time. The line identifies the requestor, the service, and the value of the performance statistic.

Through prconfig.xml file entries or Dynamic System Settings, you can control whether alerts appear and the threshold value in milliseconds for each type of alert.

Statistics available

Five elapsed time statistics are available for most service types. When any of these five measured times exceeds a corresponding threshold, the system adds a PEGA0011 alert to the Alert log.

  • pxTotalReqTime — Total request time, alerts appear by default for times exceeding 1 second.
  • pxServiceImpMapReqTime — Request mapping.
  • pxServiceOutMapReqTime — Response mapping.
  • pxServiceActivityTime — Service activity execution.
  • pxServiceParseRuleTime — Parse XML rule, Parse Delimited rule, and Parse Structured rule execution.

Three of the five statistics are available for listeners:

  • pxServiceActivityTime
  • pxServiceImpMapReqTime
  • pxServiceParseRuleTime

One of these values appears as the KPI Value in the alert message, the actual value in milliseconds that exceeded the threshold value.

Each PEGA0011 alert includes actual values for all five statistics, in the PAL Statistics field. Consult Performance tool — Statistics for services for definitions of these values. See the Pega Community article PEGA0011 alert: Total request time exceeds limit.

Changing the threshold values

  1. To change the pxTotalReqTime alerts, edit the prconfig.xml file to set a minimum value for the totalRequestTime element in milliseconds, and to control whether pxTotalReqTime alerts appear: For example, to set the value to 850 milliseconds, add this element:
    <env name="alerts/services/totalRequestTime/enabled" value="true"><env name="alerts/services/totalRequestTime/threshold" value="850">
  2. Stop and redeploy or restart the Pega Platform server.
  3. Monitor the Alert log for messages.

The statistics for pxServiceImpMapReqTime, pxServiceOutMapReqTime, pxServiceActivityTime, and pxServiceParseRuleTime are included in PEGA0011. If you want to monitor the time thresholds individually, change the enabled setting to "true". Edit the default threshold value if necessary.

The default prconfig.xml settings for these alerts are as follows:

<env name="alerts/services/inboundMapping/enabled" value="false"><env name="alerts/services/inboundMapping/threshold" "500">
<env name="alerts/services/outboundMapping/enabled" value="false"><env name="alerts/services/outboundMapping/threshold" value="500">
<env name="alerts/services/activityTime/enabled" value="false"><env name="alerts/services/activityTime/threshold" value="500">
<env name="alerts/parse/totalTime/enabled" value="false"><env name="alerts/parse/totalTime/threshold" value="500">
Note:

As an alternative to updating the prconfig.xml file, you can use Dynamic System Settings to configure your application. See Dynamic System Settings data instances.

For information about alerts and services, see the Pega Community article Testing Services and Connectors.

For information on all prconfig.xml file settings, see the Pega Community article Configuration Settings Reference.

BPEL services operate asynchronously and are not monitored by this facility.

The rule type Rule-Service-BPEL is deprecated. Use Service SOAP rules instead.