I am getting following OutOfMemory error. I have Camunda in standalone java application setup with default h2 database setup (in-memory db).
Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.insertByteArray (batch index #1) failed. Cause: org.h2.jdbc.JdbcBatchUpdateException: The database has been closed [90098-168]
Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.insertByteArray (batch index #1) failed. Cause: org.h2.jdbc.JdbcBatchUpdateException: The database has been closed [90098-168]
org.h2.jdbc.JdbcBatchUpdateException: The database has been closed [90098-168]
org.h2.jdbc.JdbcSQLException: The database has been closed [90098-168]
org.h2.jdbc.JdbcSQLException: The database has been closed [90098-168]
org.h2.jdbc.JdbcSQLException: Out of memory.; SQL statement:
insert into ACT_GE_BYTEARRAY(ID_, NAME_, BYTES_, DEPLOYMENT_ID_, TENANT_ID_, REV_)
values (
?,
?,
?,
?,
?,
1
) [90108-168]
'. Flush summary:
[
INSERT ByteArrayEntity[215568]
INSERT ByteArrayEntity[215570]
INSERT ByteArrayEntity[215572]
INSERT ByteArrayEntity[215574]
INSERT ByteArrayEntity[215579]
INSERT ByteArrayEntity[215581]
INSERT ByteArrayEntity[215583]
INSERT ByteArrayEntity[215585]
INSERT ByteArrayEntity[215587]
INSERT ByteArrayEntity[215589]
]
org.camunda.bpm.engine.ProcessEngineException: ENGINE-03083 Exception while executing Batch Database Operations with message ’
I am executing the following statement in loop for 500 times
for(int i=0; i<500;i++){
processEngine.getRuntimeService().startProcessInstanceByKey(“testProcess”, variables);
}
Is there a way to flush the process state into h2 db after each execution of process in the above loop?
Also can I disable the use of database in standalone application mode?
Thanks