cancel
Showing results for 
Search instead for 
Did you mean: 

How to control the poling interval on the ACT_RU_JOB table

rajeshiv
Champ in-the-making
Champ in-the-making
Hi,
I have a work flow with an expiration timer set on it. I see that the activiti polls on the ACT_RU_JOB. I see that the below two queries are being executed every time it polls.

select *
from ACT_RU_JOB
where (RETRIES_ > 0) and (DUEDATE_ is null or DUEDATE_ < :1) and (LOCK_OWNER_ is null or LOCK_EXP_TIME_ < :2) and (RETRIES_ > 0)
SQL Details: 3mwmj7bu8yw9w

select *
from ACT_RU_JOB
where (TYPE_ = 'timer') and (DUEDATE_ is not null) and (DUEDATE_ < :1) and (LOCK_OWNER_ is null or LOCK_EXP_TIME_ < :2) and (RETRIES_ > 0) order by DUEDATE_

However I have large number of records in those tables and because activiti is polling I see that the above two queries are executing thousand of times in a soan of 15 mins. This is causing about 80% of my CPU time. Is there a way to manage the time interval at which activiti will poll for these tabels? what do you suggest so that these queries are not executed that frequently ?

Your advise is highly appreciated .
Thanks in advance !!!
Regards
Rajesh
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
See my answer in your other, exactly the same, post.