<?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 asyncExecutorAsyncJobLockTimeInMillis resets to 5 minutes when I override to custom time in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/asyncexecutorasyncjoblocktimeinmillis-resets-to-5-minutes-when-i/m-p/40073#M16803</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am noticing the below issue sporadically in my application . I am using springboot with activiti 6.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have long running Jobs in each of the service tasks which could last upto 1-2 hour. Since I have like 20+ processes , I did not follow segregating the external calls to signal the User task as I end up in&amp;nbsp; creating big process workflow. I was overriding the&amp;nbsp;asyncExecutorAsyncJobLockTimeInMillis&amp;nbsp; from 5 minutes to my custom time (say 3 hours ). I noticed that some of the process steps were getting picked by Async job twice or more. When I tried to trace the history of ACT_RU_JOB , I see for some steps the lock expiry time is set to 5 minutes. What could have caused this issue?&lt;/P&gt;&lt;P&gt;Bean that sets the custom&amp;nbsp; Lock Expiry Time:&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/43638"&gt;@bean&lt;/A&gt;&lt;BR /&gt;public SpringAsyncExecutor springAsyncExecutor () {&lt;BR /&gt;&lt;BR /&gt;SpringAsyncExecutor asyncExecutor = new SpringAsyncExecutor();&lt;BR /&gt;asyncExecutor.setTimerLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours&lt;BR /&gt;asyncExecutor.setAsyncJobLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours&lt;BR /&gt;return asyncExecutor;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Also In addition to that I set it at engine config level as well:&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/43638"&gt;@bean&lt;/A&gt;&lt;BR /&gt;public SpringProcessEngineConfiguration springProcessEngineConfiguration(&lt;BR /&gt;@Qualifier("activitiTxMnger") PlatformTransactionManager transactionManager,&lt;BR /&gt;@Qualifier("springAsyncExecutor") SpringAsyncExecutor springAsyncExecutor) throws IOException {&lt;/P&gt;&lt;P&gt;SpringProcessEngineConfiguration engineConfig = baseSpringProcessEngineConfiguration(&lt;BR /&gt;activitiDataSource(),&lt;BR /&gt;transactionManager,&lt;BR /&gt;springAsyncExecutor);&lt;BR /&gt;&lt;BR /&gt;engineConfig.setAsyncExecutorNumberOfRetries(0);&lt;BR /&gt;engineConfig.setAsyncExecutorTimerLockTimeInMillis(config.getMaximumProcessingTime()); //12 hours&lt;BR /&gt;engineConfig.setAsyncExecutorAsyncJobLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours&lt;BR /&gt;engineConfig.setAsyncExecutorActivate(true);&lt;BR /&gt;engineConfig.setDatabaseSchemaUpdate("true");&lt;BR /&gt;engineConfig.setHistory(HistoryLevel.AUDIT.getKey());&lt;BR /&gt;&lt;BR /&gt;return engineConfig;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Any help is appreciated!!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2020 19:26:17 GMT</pubDate>
    <dc:creator>sarveshmvm</dc:creator>
    <dc:date>2020-05-18T19:26:17Z</dc:date>
    <item>
      <title>asyncExecutorAsyncJobLockTimeInMillis resets to 5 minutes when I override to custom time</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/asyncexecutorasyncjoblocktimeinmillis-resets-to-5-minutes-when-i/m-p/40073#M16803</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am noticing the below issue sporadically in my application . I am using springboot with activiti 6.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have long running Jobs in each of the service tasks which could last upto 1-2 hour. Since I have like 20+ processes , I did not follow segregating the external calls to signal the User task as I end up in&amp;nbsp; creating big process workflow. I was overriding the&amp;nbsp;asyncExecutorAsyncJobLockTimeInMillis&amp;nbsp; from 5 minutes to my custom time (say 3 hours ). I noticed that some of the process steps were getting picked by Async job twice or more. When I tried to trace the history of ACT_RU_JOB , I see for some steps the lock expiry time is set to 5 minutes. What could have caused this issue?&lt;/P&gt;&lt;P&gt;Bean that sets the custom&amp;nbsp; Lock Expiry Time:&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/43638"&gt;@bean&lt;/A&gt;&lt;BR /&gt;public SpringAsyncExecutor springAsyncExecutor () {&lt;BR /&gt;&lt;BR /&gt;SpringAsyncExecutor asyncExecutor = new SpringAsyncExecutor();&lt;BR /&gt;asyncExecutor.setTimerLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours&lt;BR /&gt;asyncExecutor.setAsyncJobLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours&lt;BR /&gt;return asyncExecutor;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Also In addition to that I set it at engine config level as well:&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/43638"&gt;@bean&lt;/A&gt;&lt;BR /&gt;public SpringProcessEngineConfiguration springProcessEngineConfiguration(&lt;BR /&gt;@Qualifier("activitiTxMnger") PlatformTransactionManager transactionManager,&lt;BR /&gt;@Qualifier("springAsyncExecutor") SpringAsyncExecutor springAsyncExecutor) throws IOException {&lt;/P&gt;&lt;P&gt;SpringProcessEngineConfiguration engineConfig = baseSpringProcessEngineConfiguration(&lt;BR /&gt;activitiDataSource(),&lt;BR /&gt;transactionManager,&lt;BR /&gt;springAsyncExecutor);&lt;BR /&gt;&lt;BR /&gt;engineConfig.setAsyncExecutorNumberOfRetries(0);&lt;BR /&gt;engineConfig.setAsyncExecutorTimerLockTimeInMillis(config.getMaximumProcessingTime()); //12 hours&lt;BR /&gt;engineConfig.setAsyncExecutorAsyncJobLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours&lt;BR /&gt;engineConfig.setAsyncExecutorActivate(true);&lt;BR /&gt;engineConfig.setDatabaseSchemaUpdate("true");&lt;BR /&gt;engineConfig.setHistory(HistoryLevel.AUDIT.getKey());&lt;BR /&gt;&lt;BR /&gt;return engineConfig;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Any help is appreciated!!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 19:26:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/asyncexecutorasyncjoblocktimeinmillis-resets-to-5-minutes-when-i/m-p/40073#M16803</guid>
      <dc:creator>sarveshmvm</dc:creator>
      <dc:date>2020-05-18T19:26:17Z</dc:date>
    </item>
  </channel>
</rss>

