I have .NET C# Camunda clients that work with external tasks.
I run BPM process that has about 20 tasks. For each task there is a worker thread that perform long polling to get work.
The problem is that there is delay between the tasks execution. After one task is finished, the next task fetchAndLock doesn’t response immediately, the response return after more that 1000 miliseconds.
When I look at the process history ("/history/activity-instance?processInstanceId=…"), I can see that task durationInMillis include the delay.
After disabling the long polling, the fetchAndLock returned immediately for all tasks.
Another thing, I work with PostresSql. When I switch to h2, there’s no problem at all.
Is there a reason why fetchAndLock response is delayed?
What is the best practice to work with AsyncResponseTimeout ?