AnsweredAssumed Answered

Out of memory issues when doing lots of variable get/set

Question asked by krdevos on Aug 28, 2012
Latest reply on Aug 29, 2012 by trademak

I'm using activiti in a prodcution environment to handle a simple sort of approval flow. I put a serializable object to the processinstance to pass through the different steps. There is also a possibility to update the variable without changing task.

However when I try to do a lot of get variables and set again I get an out of memory exception, probably a stream that's not closed each time.

We merely use taskservice and runtimeservice.getVariables, but calling this a few time in a row, with a serializable object of a few MB will result in an out of memory issue.

Anyone has an idea to solve this?


at org.activiti.engine.impl.variable.SerializableType.getValue(
   at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.collectVariables(
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.collectVariables(
   at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariables(
   at org.activiti.engine.impl.cmd.GetTaskVariablesCmd.execute(
   at org.activiti.engine.impl.cmd.GetTaskVariablesCmd.execute(
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(
   at org.activiti.spring.SpringTransactionInterceptor.execute(
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(
   at org.activiti.engine.impl.TaskServiceImpl.getVariables(