Deadlock exception

Hello Everyone,

Can anyone know how to resolve this exception?

017-08-16 00:15:52,666 ERROR [org.camunda.bpm.engine.context] (default task-19) ENGINE-16004 Exception while closing command context: ENGINE-03004 Exception while executing Database Operation ‘INSERT HistoricVariableInstanceEntity[5b4e5ee5-8240-11e7-b1c1-9eb320524153]’ with message ’

Error updating database. Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK

SQL: insert into ACT_HI_VARINST ( ID_, PROC_DEF_KEY_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_INST_ID_, TENANT_ID_, CASE_DEF_KEY_, CASE_DEF_ID_, CASE_INST_ID_, CASE_EXECUTION_ID_, TASK_ID_, NAME_, REV_, VAR_TYPE_, BYTEARRAY_ID_, DOUBLE_, LONG_, TEXT_, TEXT2_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )

Cause: java.sql.SQLException: IJ031070: Transaction cannot proceed: STATUS_ROLLEDBACK’. Flush summary:

INSERT HistoricVariableInstanceEntity[5b4e5ee5-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5bd6057a-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c0a5bef-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c83d1b4-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c861bab-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c861bad-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c861baf-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c861bb1-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[5c861bb3-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[6492cee0-8240-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[c6215e51-8241-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[c6215e54-8241-11e7-b1c1-9eb320524153]
INSERT HistoricVariableInstanceEntity[c621ac79-8241-11e7-b1c1-9eb320524153]


Please share complete error log.
There could be multiple reasons for this error.

  1. If you are storing String variable and its length is >4000 char it fails.
  2. Could fail if multiple thread tries to update the variable, one thread will fail with Optimistic lock exception.

Share complete log.

1 Like

Also, are you sure you see a deadlock? The exception tells that the current transaction has been rolled back. The next question is: Who rolled it back? For example the application server rolls back a transaction, if it exceeds the configured transaction timeout. There should be respective log entries if this is the case.

1 Like

Here is the complete server log.
server log.txt (190.5 KB)


“2017-08-16 00:15:53,301 WARN [com.arjuna.ats.arjuna] (default task-19) ARJUNA012077: Abort called on already aborted atomic action 0:ffff820a47c0:3cc32e74:5993d1ef:e0”

This sounds like a transaction timeout of the JBoss / Wildfly server.
The default value for the maximum duration of a transaction is 300 seconds. You can change this value but …

1 Like

where do i change this value?

HowTo’s are very easy to find on the web using your favorite search engine. :wink:

1 Like

Ok. Thanks for the clarification