This article details how to identify and remediate MariaDB database deadlocks in Appian.
Database deadlocks occur when two or more transactions are attempting to access the same resource; however neither is able to complete because each transaction is blocking the resource from the other. Additionally any other activities attempting to access the resource will be blocked.
Note: This KB is for customers with Appian Cloud Maria DB. Customers with self-managed databases will need to contact their Database Administrator.
You can identify database deadlocks from tomcat-stdOut.log in the <APPIAN_HOME>/logs directory.
<APPIAN_HOME>/logs
Error details: Deadlock found when trying to lock; try restarting transaction
Caused by: org.springframework.dao.DeadlockLoserDataAccessException... Deadlock found when trying to get lock; try restarting transaction..
CALL AppianProcess.showEngineInnodbStatus()
The output of this stored procedure will be quite large, so you have to select "Full Text" to find details of the latest deadlock.
Go to "Extra options" > "Full texts" > "Go"
If there are deadlocks, you should see two competing transactions listed as deadlocks.
------------------------LATEST DETECTED DEADLOCK------------------------YYYY-MM-DD HH:MM:SS <DEADLOCK_ID>*** (1) TRANSACTION:<TRANSACTION_DETAILS>*** (2) TRANSACTION:<TRANSACTION DETAILS>
If there are no deadlocks, you won't see any competing transactions and will get the default output.
-----------------BACKGROUND THREAD-----------------srv_master_thread loops: 5 srv_active, 0 srv_shutdown, 2092029 srv_idlesrv_master_thread log flush and writes: 2092023----------SEMAPHORES----------------------TRANSACTIONS------------
If there are deadlocks listed in the InnoDB status output
Identify the details of both transactions in the deadlock
If there are no deadlocks listed in the InnoDB status output
Try the following stored procedures to see other types of database locks
CALL AppianProcess.databaseLocks()CALL AppianProcess.metadataLocks()
This article applies to all versions of Appian Cloud.
Last Reviewed: February 2025