Hello,
We have a service task in our modeler that takes longer than 20 minutes to execute. Upon running our camunda process, we received the following stack trace from that delegate:
### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #5) failed. 4 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 delete from ACT_GE_BYTEARRAY where ID_ = '524082' was aborted. Call getNextException to see the cause.
### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #5) failed. 4 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 delete from ACT_GE_BYTEARRAY where ID_ = '524082' was aborted. Call getNextException to see the cause.
java.sql.BatchUpdateException: Batch entry 0 delete from ACT_GE_BYTEARRAY where ID_ = '524082' was aborted. Call getNextException to see the cause.
org.postgresql.util.PSQLException: ERROR: update or delete on table "act_ge_bytearray" violates foreign key constraint "act_fk_job_exception" on table "act_ru_job"
Detail: Key (id_)=(524082) is still referenced from table "act_ru_job".
'. Flush summary:
[
INSERT HistoricActivityInstanceEventEntity[submit-enrollment-request-task:524391]
INSERT MessageEntity[524961]
DELETE IncidentEntity[524736]
DELETE MessageEntity[523971]
DELETE_BULK deleteByteArrayNoRevisionCheck 524082
UPDATE ExecutionEntity[523945]
]
org.camunda.bpm.engine.ProcessEngineException: ENGINE-03083 Exception while executing Batch Database Operations with message '
### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #5) failed. 4 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 delete from ACT_GE_BYTEARRAY where ID_ = '524082' was aborted. Call getNextException to see the cause.
### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #5) failed. 4 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 delete from ACT_GE_BYTEARRAY where ID_ = '524082' was aborted. Call getNextException to see the cause.
java.sql.BatchUpdateException: Batch entry 0 delete from ACT_GE_BYTEARRAY where ID_ = '524082' was aborted. Call getNextException to see the cause.
org.postgresql.util.PSQLException: ERROR: update or delete on table "act_ge_bytearray" violates foreign key constraint "act_fk_job_exception" on table "act_ru_job"
Detail: Key (id_)=(524082) is still referenced from table "act_ru_job".
'. Flush summary:
[
INSERT HistoricActivityInstanceEventEntity[submit-enrollment-request-task:524391]
INSERT MessageEntity[524961]
DELETE IncidentEntity[524736]
DELETE MessageEntity[523971]
DELETE_BULK deleteByteArrayNoRevisionCheck 524082
UPDATE ExecutionEntity[523945]
]
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationsException(EnginePersistenceLogger.java:698)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:355)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:318)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:290)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:203)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:132)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:36)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:29)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:88)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:57)
We have since found out that async service tasks have a 5 minute time out by default and if we need longer than that we need to revisit our design. We will be doing this next.
My question is, when this delegate failed it retried 12 times 5 minutes apart. We are not setting this anywhere and we are unable to find where this default re-try is set. Any help in finding out where this is happening would be greatly appreciated.
Thank you.