Pega-IntSvcs agent does not work correctly
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 MessagesNot Applicable
Steps to Reproduce
- Open a work object using a browser requestor.
- Acquire a lock on the work object manually.
- Configure an HTTP service.
- Modify the same work object by acquiring a lock on it.
- Create a Request Processor rule.
- Queue the request if the service cannot acquire a lock on the work object.
- 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 CauseA defect in Pegasystems’ code or rules: Changes in architectural design.
ResolutionPerform the following local-change:
- Backup the database.
- Apply HFix-41382.
- Add the below Dynamic System Setting (DSS).
Setting Purpose: prconfig/initialization/agents/retryDelayForAgentQueue/default
Value: "RS1:agent1,1000,RS2:agent2,2000" (In user's case : Pega-IntSvcs:ProcessServiceQueue,180000)
- Restart the Application server.
Functionality of DSS:
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.
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.
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