Search code examples
bpmncamundacamunda-modeler

Camunda Timer event unexpected delay in timing


I have a process in which I have used a timer event. The timer event is of type Duration and has wait time of 30 minutes(PT30M). This timer event is expected to end exactly after 30 minutes, but it takes additional 15 or 30 seconds. This behavior is observed and the delay is exactly 15 or 30 seconds every time even if I change (increase or decrease) the duration of timer event. I would like to know why does it take 15 seconds extra then required to execute.


Solution

  • A timer in a BPMN process is persisted as a job in Camunda. The job executor component repeatedly polls the job table for any jobs that are due. In case there are no due jobs, the polling applies exponential backoff, by default sleeping up to 60 seconds between polling attempts. So if your system has little load, this kind of delay is to be expected. You can use the job executor configuration property maxWait to change the maximum sleeping period.

    Relevant documentation: