AnsweredAssumed Answered

How can we predict memory usage for operations? (To avoid OOM)

Question asked by gspoffordalfresco on Jan 3, 2019
Latest reply on Jan 7, 2019 by pault

I hope this question is not hopelessly naive for the Alfresco community. Using Activiti community version 6.0, it's been easy for test processes that we've created to OOM our service when creating certain processes. A 29,000-way ParallelMultiInstance subprocess consisting of 1 user task with 3 timer events and service tasks does not fit within a JVM heap of 4GB. Doing a bit of profiling and examining an OOM heap dump, it seems that there are several objects created per task, for example HistoricVariableInstanceEntityImpl objects associated with each iteration of the ParallelMultiInstanceBehavior loops. Some of this is exacerbated by Activiti picking up the Spring Boot's Tomcat's JUEL interpreter instead of the de.odysseus JUEL, as the former seems to hold memory much more aggressively than the latter. 


By reputation, we'd expect that there is a decent number of Activiti users running largish ParallelMultiInstance processes, and running in a Tomcat container, but I haven't found any information on how to size memory based on process instance characteristics. Googling for Activiti OutOfMemoryError or OOM doesn't yield much today. Is there any guide available, or do any readers of this question have insights that they can share?