Hi everyone,
I’m getting a bunch of Incidents (40+ sometimes) created when running a model that has a Call Activity that calls another BPMN model basically 6000+ times in parallel. In the model parallel Call Activity I selected the “Multi Instance Async Before, Multi Instance Async After, Multi Instance Excluse” options. It doesn’t seem to fail if there are less than 2000 calls, but when it gets to around 5000 then it starts to fail with this error:
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 #7) failed. 6 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #7) failed. 6 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
java.sql.SQLIntegrityConstraintViolationException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
java.sql.SQLException: Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
Query is: delete from ACT_GE_BYTEARRAY where ID_ = ‘08677313-eace-11e8-9658-0242d103390e’
'. Flush summary:
[
INSERT HistoricProcessInstanceEventEntity[08d354ac-eace-11e8-9658-0242d103390e]
INSERT HistoricActivityInstanceEventEntity[Task_1irwi18:08d21c2b-eace-11e8-9658-0242d103390e]
INSERT ExecutionEntity[08d354ac-eace-11e8-9658-0242d103390e]
INSERT VariableInstanceEntity[08d354ad-eace-11e8-9658-0242d103390e]
INSERT VariableInstanceEntity[08d354ae-eace-11e8-9658-0242d103390e]
INSERT VariableInstanceEntity[08d354af-eace-11e8-9658-0242d103390e]
INSERT MessageEntity[08d3a2d0-eace-11e8-9658-0242d103390e]
DELETE MessageEntity[4fca8ea9-eacd-11e8-9658-0242d103390e]
DELETE_BULK deleteByteArrayNoRevisionCheck 08677313-eace-11e8-9658-0242d103390e
UPDATE ExecutionEntity[4f86f64b-eacd-11e8-9658-0242d103390e]
]
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationsException(EnginePersistenceLogger.java:689)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:358)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:321)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:293)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:204)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:133)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:113)
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:47)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:40)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:88)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #7) failed. 6 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #7) failed. 6 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:255)
at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.flushOperations(DbSqlSession.java:88)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:353)
… 14 more
Caused by: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #7) failed. 6 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:146)
at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:129)
at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:122)
at org.apache.ibatis.executor.CachingExecutor.flushStatements(CachingExecutor.java:114)
at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:253)
… 16 more
Caused by: java.sql.BatchUpdateException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
at org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:282)
at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeBatch(MariaDbPreparedStatementClient.java:294)
at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
at com.sun.proxy.$Proxy4.executeBatch(Unknown Source)
at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:122)
… 20 more
Caused by: java.sql.SQLIntegrityConstraintViolationException: (conn=3558) Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:171)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:110)
at org.mariadb.jdbc.MariaDbStatement.executeBatchExceptionEpilogue(MariaDbStatement.java:279)
… 27 more
Caused by: java.sql.SQLException: Cannot delete or update a parent row: a foreign key constraint fails (tesrocks
.ACT_RU_JOB
, CONSTRAINT ACT_FK_JOB_EXCEPTION
FOREIGN KEY (EXCEPTION_STACK_ID_
) REFERENCES ACT_GE_BYTEARRAY
(ID_
))
Query is: delete from ACT_GE_BYTEARRAY where ID_ = ‘08677313-eace-11e8-9658-0242d103390e’
at org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:119)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol$1.handleResultException(AbstractQueryProtocol.java:567)
at org.mariadb.jdbc.internal.protocol.AsyncMultiRead.call(AsyncMultiRead.java:140)
at org.mariadb.jdbc.internal.protocol.AsyncMultiRead.call(AsyncMultiRead.java:67)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
… 3 more
I can’t really figure out what is causing this or how to fix it. I’m using MariaDb version 10.1. I had this same problem in Camunda v7.7 and now also in Camunda v7.10 alpha4.
If you can help please let me know.
Thank you!
Jim