Delay in scheduling a workflow

Hi,
I’ve just started to work on Temporal so apologies in advance if this is answered elsewhere (I did google and look around in the forum).

I have successfully used go-sdk v1.16.0 to deploy and run workflows and activities and moved on to creating mutex-pattern using workflows based on this sample - samples-go/mutex at main · temporalio/samples-go · GitHub. While it does work, there is a constant delay in starting a scheduled worflow as illustrated by the picture from temporal’s Web UI below :

Also, the scheduler waits for the 1 min boundary for starting (so the next time a workflow could be potentially started, regardless when the “WorkflowTaskScheduled” kicks in, will be around UTC 17:29:28 based on prior runs.

This is probably limited information but hoping for some pointers from experienced members.

And if this is woefully insufficient data appreciate if you can help me gather the right data.

Thank you in advance!

What is WorkflowTaskStarted.attempt value?

Hi @maxim , ty for the response. The Attempt value is 1, I think…assuming I’m looking at the right place:

Also, couple more datapoints

Do let me know if you’d like me to push the modified mutex sample to github.

Noticed v1.17.0 was released recently. Same issue with that version as well.

Do let me know if you’d like me to push the modified mutex sample to github.

Yes think that would help. And let us know which workflow history to look at, think the mutex sample currently starts multiple executions.

Hi @tihomir, ty for the response. I pushed it to GitHub - muralisrini/samples-go at mutex_add_workflows

It looks workflows can get delayed randomly. Although the first one always appears to run immediately.

One thing though. I started with mutex as that was the model I was going to use. The issue appears to happen even when not using the mutex example.

Pushed a change to reduce the Sleep in the example from 10s to 1s to speed up those cases where the workflow does start immediately.

Also, FWIW, I was able to see the delays in a few workflows when running with temporalite.

Hi @tihomir, any update on this ?

Hi @tihomir, any further update on this ? Is it a legitimate issue (and not a coding problem from my end) ?

Sorry haven’t had the chance to run your updated sample code yet. Will do asap

Hi @tihomir, did you get a chance to run the sample ? We will soon be blocked by this.

Hi, left a comment on the issue you opened here.

Hi @tihomir , not sure that addresses the issue, We investigated some more and added a new comment to the issue.

Thank you for looking into this.