<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Out of memory issues when doing lots of variable get/set in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102932#M71707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone has an idea to solve this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;at org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:49)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(VariableInstanceEntity.java:158)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.collectVariables(VariableScopeImpl.java:84)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.collectVariables(VariableScopeImpl.java:81)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariables(VariableScopeImpl.java:65)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.cmd.GetTaskVariablesCmd.execute(GetTaskVariablesCmd.java:62)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.cmd.GetTaskVariablesCmd.execute(GetTaskVariablesCmd.java:31)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at org.activiti.engine.impl.TaskServiceImpl.getVariables(TaskServiceImpl.java:172)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2012 14:40:14 GMT</pubDate>
    <dc:creator>krdevos</dc:creator>
    <dc:date>2012-08-28T14:40:14Z</dc:date>
    <item>
      <title>Out of memory issues when doing lots of variable get/set</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102932#M71707</link>
      <description>Hi,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</description>
      <pubDate>Tue, 28 Aug 2012 14:40:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102932#M71707</guid>
      <dc:creator>krdevos</dc:creator>
      <dc:date>2012-08-28T14:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Out of memory issues when doing lots of variable get/set</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102933#M71708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A serialized object of a couple of MBs is not really a normal way of using process variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it not possible to store a reference to the serialized object in the process instance and store the object itself somewhere else?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 09:51:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102933#M71708</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-08-29T09:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Out of memory issues when doing lots of variable get/set</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102934#M71709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THX for the reply. And I must admit your response is a valid one, however changing this current architecture would take some serious refactoring time and money.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you mean that the architecture of activiti is not setup to handle a large serialized block of data as process variable?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kristof&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 11:33:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102934#M71709</guid>
      <dc:creator>krdevos</dc:creator>
      <dc:date>2012-08-29T11:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Out of memory issues when doing lots of variable get/set</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102935#M71710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, it's certainly not the best practice on how to use process variables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you do these getVariable calls within the same transaction? So does it only contain synchronous service tasks etc? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then all the variables may still be in memory. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How much MB are we talking about in total? Can't you increase the memory settings? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you do the getVariable calls in the same transaction then switching to asynchronous tasks could be a solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 15:17:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/out-of-memory-issues-when-doing-lots-of-variable-get-set/m-p/102935#M71710</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-08-29T15:17:26Z</dc:date>
    </item>
  </channel>
</rss>

