Hi,
The following exception might be specific to my implementation but I need help to debug it. I am using Platform version 6.9.6.
2018-10-01 13:19:32,403 ERROR c.h.c.core.sys.ServiceInterceptor - Exception:
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: deadlock detected
Detail: Process 10375 waits for ShareLock on transaction 53829923; blocked by process 10326.
Process 10326 waits for ShareLock on transaction 53829925; blocked by process 10375.
Hint: See server log for query details.
Where: while updating tuple (20,23) in relation "act_ru_execution"
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.updateExecution-Inline
### The error occurred while setting parameters
### SQL: update ACT_RU_EXECUTION set REV_ = ?, BUSINESS_KEY_ = ?, PROC_DEF_ID_ = ?, ACT_ID_ = ?, IS_ACTIVE_ = ?, IS_CONCURRENT_ = ?, IS_SCOPE_ = ?, IS_EVENT_SCOPE_ = ?, PARENT_ID_ = ?, SUPER_EXEC_ = ?, SUSPENSION_STATE_ = ?, CACHED_ENT_STATE_ = ?, NAME_ = ? where ID_ = ? and REV_ = ?
### Cause: org.postgresql.util.PSQLException: ERROR: deadlock detected
Detail: Process 10375 waits for ShareLock on transaction 53829923; blocked by process 10326.
Process 10326 waits for ShareLock on transaction 53829925; blocked by process 10375.
Hint: See server log for query details.
Where: while updating tuple (20,23) in relation "act_ru_execution"
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:172)
at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:878)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:619)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:212)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:138)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at com.haulmont.bpm.core.engine.spring.ExtSpringTransactionInterceptor.execute(ExtSpringTransactionInterceptor.java:36)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.RuntimeServiceImpl.setVariableLocal(RuntimeServiceImpl.java:246)
at com.haulmont.bpm.core.ProcessRuntimeManagerBean.completeProcTask(ProcessRuntimeManagerBean.java:201)
at com.leapmile.qikpod.pds.service.TaskServiceBean.completeProcTask(TaskServiceBean.java:426)
I am facing this for months now on all previous versions and I was ignoring as same works on retry. What I am doing here is just calling completeProcTask(ProcTask procTask, String outcome, String comment, Map<String, Object> processVariables) of ProcessRuntimeManager.
Let me know if anymore details needed.
Thanks