Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

RuleUsageSnapshot agent deadlocking on pr4_log table deletes

SA-35515

Summary



In a cluster, multiple JVMs deadlock processing RuleUsageSnapshot.


Error Messages



2017-03-17 00:00:30,491 [.PegaWorkManager : 1] [ STANDARD] [ PegaRULES:07.10] (l.access.ConnectionManagerImpl) ERROR - Not returning connection 3 for database "pegadata" to the pool as it previously encountered the following error
User ID: System
Last SQL: delete from DATA.pr4_log_rule_usage_details where pxObjClass = 'Log-RuleUsage-Details' and pxSystemNode = ? and pyLabel = ?
com.ibm.db2.jcc.am.SqlTransactionRollbackException: The current transaction has been rolled back because of a deadlock or timeout. Reason code "68".. SQLCODE=-911, SQLSTATE=40001, DRIVER=4.19.66


Steps to Reproduce



Not Applicable

Root Cause



A defect or configuration issue in the operating environment

In the normal course of events the collection of RuleUsageSnapshot data will happen once a day as part of the PegaRULES agent. This should be scheduled to run on all nodes in the cluster. It is then possible for deadlocks to occur when the code is run on multiple nodes around the same time.


Resolution



Perform the following local-change:

Using the Agent Schedule for the PegaRULES agent for each node, schedule the start time to be offset on each node. In that way the data - which is deleted by System Node ID, can be purged and re-added without contention.

If this does not prove to be a sufficient change and deadlocks still occur then consider partitioning the data on the PXSYSTEMNODE column. DBA staff should be consulted regarding the implementation of this level change.

Suggest Edit

Published March 26, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us