IV76685: Deadlocks are triggered when saving workflow instances


It is possible to trigger a deadlock when saving workflow instances. This was noticed when using TRIRIGA 3.3.2.2 with Microsoft SQL as a database, but this may happen with other versions of TRIRIGA, as well. After setting WF_INSTANCE_SAVE to ALWAYS instead of ERRORS_ONLY, workflows were hanging at the same time that SQL and/or Java thread deadlock errors were being written to the server.log. The following is an example of one of the types of errors being observed in the server.log when this problem happened:

Transaction (Process ID 67) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.; nested exception is java.sql.SQLException: Transaction (Process ID 67) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.. Workflow Information: [...]

As a temporary fix, (1) keep WF_INSTANCE_SAVE set to ERRORS_ONLY, particularly in PRODUCTION environments. (2) On SQL Server, ensure MAXDOP is set to to a percentage of CPU cores on the server. For example, if a 16-core DB server is present, set MAXDOP to 4. This value should never be set to 0. In addition, we added a warning if a deadlock occurs when saving workflow instances, stating the process could not save workflow instance step list. “You may be saving too many instances. Do not set Workflow Instance Saving to ALWAYS in a production environment.”

Continue reading 

One thought on “IV76685: Deadlocks are triggered when saving workflow instances

  1. Pingback: How can you diagnose memory issues in TRIRIGA servers? | TRIRIGAFEEDIA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s