Support Article

Pega-IntSvcs agent does not work correctly

SA-53262

Summary

An HTTP service is configured and a work object is processed using the service activity.

In the service rule, a QueueWhen condition is configured. The item is requested using a Request Processor rule if a lock is not acquired on the work object.

The user has opened a case, acquired a lock manually on it, and run the service. The service activity attempts to acquire the lock on the same work object. The activity fails as the work object already has a manual lock on it. 

According to the Request Processor configuration, the activity creates a queue item for the System-Queue-ExecutionRequest-Service-Default class.

In Pega IntSvcs > ProcessServiceQueue agent must process the queue item based on the interval configured.


The maximum Number of execution attempts is set to 50 in the Service Request Processor rule.

According to Pega-IntSvcs > ProcessServiceQueue agent configuration, the queue item must be processed every 180 seconds. If the processing fails, the job is attempted again after 180 seconds.
At the user end, the maximum number of execution attempts (50) try to perform the job simultaneously.

The requirement is for the agent to attempt the queue item every 180 seconds and process the queue item in 9000 seconds. However, in the user end, the agent processes all the attempts in 180 seconds.



Error Messages



Not Applicable


Steps to Reproduce

  1. Open a work object using a browser requestor.
  2. Acquire a lock on the work object manually.
  3. Configure an HTTP service.
  4. Modify the same work object by acquiring a lock on it.
  5. Create a Request Processor rule.
  6. Queue the request if the service cannot acquire a lock on the work object.
  7. Navigate to Designer Studio > Process & Rules > Tools > Work Admin > Broken Queue Items. Check the System-Queue-ExecutionRequest-Service-Default class instances. The number of attempts is 50. The attempt must be 1 initially and must increment once every 3 minutes.


Root Cause



A defect in Pegasystems’ code or rules: Changes in architectural design.


Resolution



Perform the following local-change:
  1. Backup the database.
  2. Apply HFix-41382.
  3. Add the below Dynamic System Setting (DSS).

    Setting Purpose: prconfig/initialization/agents/retryDelayForAgentQueue/default
    RuleSetPega-Engine
    Value: "RS1:agent1,1000,RS2:agent2,2000" (In user's case : Pega-IntSvcs:ProcessServiceQueue,180000)
     
  4. Restart the Application server. 

Functionality of DSS:

For a failed item for agent1 in RS1 ruleset, the item is queued to run after 1000 milliseconds if the agent is processing other queue items in the same run.

If the agent processes all the queue items in that run in that time (that is, the agent has completed the task of that run) then the failure queue item is processed in the next run based on the agent configuration.
 
The same is declared as below in prconfig:

 <env name="initialization/agents/retryDelayForAgentQueue" value ="RS1:agent1,1000,RS2:agent2,2000">


 

Published October 23, 2018 - Updated October 8, 2020

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.