Link to post:
(asyncExecutorAsyncJobLockTimeInMillis resets to 5 minutes when I override to custom time)
by sarveshmvm
<p>Hello all,</p><p>I am noticing the below issue sporadically in my application . I am using springboot with activiti 6. </p><p>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 creating big process workflow. I was overriding the asyncExecutorAsyncJobLockTimeInMillis 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?</p><p>Bean that sets the custom Lock Expiry Time:</p><p><li-user uid="43638"></li-user><br />public SpringAsyncExecutor springAsyncExecutor () {<br /><br />SpringAsyncExecutor asyncExecutor = new SpringAsyncExecutor();<br />asyncExecutor.setTimerLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours<br />asyncExecutor.setAsyncJobLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours<br />return asyncExecutor;<br />}</p><p> </p><p>Also In addition to that I set it at engine config level as well:</p><p><li-user uid="43638"></li-user><br />public SpringProcessEngineConfiguration springProcessEngineConfiguration(<br />@Qualifier("activitiTxMnger") PlatformTransactionManager transactionManager,<br />@Qualifier("springAsyncExecutor") SpringAsyncExecutor springAsyncExecutor) throws IOException {</p><p>SpringProcessEngineConfiguration engineConfig = baseSpringProcessEngineConfiguration(<br />activitiDataSource(),<br />transactionManager,<br />springAsyncExecutor);<br /><br />engineConfig.setAsyncExecutorNumberOfRetries(0);<br />engineConfig.setAsyncExecutorTimerLockTimeInMillis(config.getMaximumProcessingTime()); //12 hours<br />engineConfig.setAsyncExecutorAsyncJobLockTimeInMillis(config.getMaximumProcessingTime()); // 12 hours<br />engineConfig.setAsyncExecutorActivate(true);<br />engineConfig.setDatabaseSchemaUpdate("true");<br />engineConfig.setHistory(HistoryLevel.AUDIT.getKey());<br /><br />return engineConfig;<br />}</p><p> </p><p>Any help is appreciated!!</p><p>Thanks</p>
This message has 0 replies
Hi @sarveshmvm,
Sometimes questions are posted twice by mistake & the spam filter picks that up as suspicious. I have removed it from the spam quarantine.
Cheers,
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.