cancel
Showing results for 
Search instead for 
Did you mean: 

Timer record in ACT_RU_JOB locked repeatedly

jim1
Champ on-the-rise
Champ on-the-rise
We have a fairly simple BPM which uses a timer to wait before creating a user task.

Start –> Timer Catching Event –> User Task –> End

We noticed that the user task wasn't becoming available at the point the timer expired, and on investigation found that the record for the timer in ACT_RU_JOB siting there with the lock_owner_ and lock_exp_time_ columns set.
Further watching shows that when the lock had expired, it was re-locked and again just sat there for the duration.

At some point after a number of these cycles the timer does seem to expire, with the task becoming available 15-90minutes after it should have been.

I've been unable to recreate this in a unit test so far, can see nothing obvious in the logs and was wondering if anyone could provide suggestions of what might be causing this?

Thanks.
3 REPLIES 3

mikew1
Champ in-the-making
Champ in-the-making
Following on from Jim's comment above, a typical entry we are seeing in the ACT_RU_JOB table looks like this. You can see that it's already got to revision 42. The revision continues to increment every 3 minutes, yet the job has never actually been executed - you can see the retries is still at 3. So the process instance just stays sitting on the timer.

<code>
id_,rev_,type_,lock_exp_time_,lock_owner_,exclusive_,execution_id_,process_instance_id_,proc_def_id_,retries_,exception_stack_id_,exception_msg_,duedate_,repeat_,handler_type_,handler_cfg_,tenant_id_

183044,42,timer,2015-10-26 11:25:23.8,30707a1d-d3ac-4146-95e0-a224bd9dbf62,t,183043,162545,TEST-v3:1:162544,3,,,2015-10-26 08:00:00,,timer-intermediate-transition,{"activityId":"sid-0F08BA31-98E7-400D-B2AB-32C33776B44E"},312

</code>

mikew1
Champ in-the-making
Champ in-the-making
OK, we found the cause. There was another instance of activiti running which happened to be pointing to the same database.

jbarrez
Star Contributor
Star Contributor
Thanks for posting back with your findings. That would explain it. But does that mean that the job get executed or not? One of the competing job executors should execute it.