ENGINE-03083 Exception while executing Batch Database Operations

Dear Camunda community,

Would appreciate some hints on an error below (Tomcat, camunda 7.9.0 shared, running in docker, Oracle 12 DB), which we never faced before.

image

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 #12) failed. 11 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: ORA-02292: integrity constraint (XXCAMUNDA.ACT_FK_JOB_EXCEPTION) violated - child record found

### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.deleteByteArrayNoRevisionCheck (batch index #12) failed. 11 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: ORA-02292: integrity constraint (XXCAMUNDA.ACT_FK_JOB_EXCEPTION) violated - child record found

java.sql.BatchUpdateException: ORA-02292: integrity constraint (XXCAMUNDA.ACT_FK_JOB_EXCEPTION) violated - child record found

java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (XXCAMUNDA.ACT_FK_JOB_EXCEPTION) violated - child record found

Full stack trace below:

dump.txt (8.4 KB)

Best regards,
Ilya

This was resolved by a more deep examination of the jobs history. So, the root cause was this:

ENGINE-03005 Execution of 'DELETE MessageEntity[af8012b6-8672-11e8-aa9d-02b8569c9fb0]' failed. Entity was updated by another transaction concurrently.

One of the jobs was polling a remote API endpoint and total amount of time for the job exceeded 5 mins. Good explanation of the issue and ways to fix is here: Optimistic Locking Exception

We actually increased lockTimeInMillis this in bpm-platform.xml:
<property name="lockTimeInMillis">1800000</property>

After restarting the server and retrying the job it successfully moved to the next step.