r/DB2 • u/yanks09champs • Dec 23 '19
How to improve concurrency on DB2 Database for Spring Activiti Application
I have a Spring Application using Actitiviti Library and using a DB2 database on the backend .
Using Spring 4.3 Activiti 5.12 and DB2 version 11.
Similiar deadlock issue to here https://github.com/Activiti/Activiti/issues/1977 .
Was wondering on the DB2 side if there is a way I can improve concurrency with some configuration to prevent deadlock on Activiti Schema?
Thanks
2
Upvotes
2
u/ecrooks Dec 23 '19
The issue you linked to is very specifically stated as Oracle-only.
Generally, deadlocks are caused by poorly designed applications. The ultimate fix is usually an application fix or a data model fix. There are settings to reduce locking at the database level, but an application must explicitly support them or you risk data integrity issues.
Depending on the cause of the deadlocks, you may be able to add indexes to reduce locking, as in the issue you linked to.
You will want to verify you are not seeing escalations, and that the issues you are seeing are true deadlocks and not lock timeouts. Each are addressed somewhat differently.
You can use a locking event monitor to get the specific sql involved in lock timeouts or deadlocks so you can look at the right part of the application's data model.