<?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 Re: Activiti engine increases CPU usage and thread count. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158260#M112384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, the jobs will be locked for a certain amount of time, before they are can be picked up by other threads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Solution for this 'problem': limit the thread pool or set the lock time very very high.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or put a timeout on the threadpool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if your job is infite … it doesnt sound like there is a right solution. Nor is there a use case for it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Apr 2014 07:48:13 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2014-04-24T07:48:13Z</dc:date>
    <item>
      <title>Activiti engine increases CPU usage and thread count.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158259#M112383</link>
      <description>Here is the issue that I am facing.I am using simple workflow with a script task and I am using below script task.def x = 0def y = 5while ( y &amp;gt; 0 ) {&amp;nbsp;&amp;nbsp;&amp;nbsp; x++}which makes the execution as infinite. I have script task as 'async'. Also the 'lockTimeInMillis' setting i set it to 120000(2 mins). For ab</description>
      <pubDate>Thu, 24 Apr 2014 07:08:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158259#M112383</guid>
      <dc:creator>mahesh_yadav</dc:creator>
      <dc:date>2014-04-24T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti engine increases CPU usage and thread count.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158260#M112384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, the jobs will be locked for a certain amount of time, before they are can be picked up by other threads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Solution for this 'problem': limit the thread pool or set the lock time very very high.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or put a timeout on the threadpool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if your job is infite … it doesnt sound like there is a right solution. Nor is there a use case for it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 07:48:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158260#M112384</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-04-24T07:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Activiti engine increases CPU usage and thread count.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158261#M112385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for you response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I was able to resolve the infinite loop issue in script task. I followed below approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Persisted task entry in my db for first call and set name of thread (it is async thread from activiti).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) The above thread hangs in script task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) When activiti retries, I check db if entry exist in my db then i know that this is internal retry and not the retry because of failure (as i already disabled exception retry by activiti).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) In this case I get all thread and find the thread with the current step id and stop it. After this throw exception so that this thread also dies.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 11:42:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/activiti-engine-increases-cpu-usage-and-thread-count/m-p/158261#M112385</guid>
      <dc:creator>mahesh_yadav</dc:creator>
      <dc:date>2014-04-25T11:42:36Z</dc:date>
    </item>
  </channel>
</rss>

