Currently we have a sequential workflow in sharepoint 2010 that has a delay activity.
The delay is set to five minutes. The workflow checks on the status of five tasks and depending on the results, it either delays or completes.
I have a workflow history log item set to write right before the delay and right after the delay.
Sometimes the delay does not fire, an example would be as follows:
Delay activity fires every five minutes for 3 full days on one item, then for no particular reason it fails to wake up for 17 hours...then fires and completes.
Any ideas? I have verified all of the timer services are running properly etc.
The other odd thing is that there can be 20 workflows items running and only 4 or 5 will have this issue, it seems totally random.
Also: If I make a change to the workflow item that causes the workflow to re-run, the delay activity will awaken at the next 5 minute cycle.
Update: I have found an error in my error log that occurs when the delay fails to awaken.
Workflow ID=07acf527-d5cb-41c7-a8e4-58329652dc53 attempting to run on a thread currently executing workflow ID=fe2d7670-7d3e-4e6a-b024-0cc3485aa73b. This workflow will be run at a later time.
Update: Apparently this is occurring because the workflow with the delay is being started programmatically from another workflow. This causes the second workflow to be started in the same thread. Any开发者_StackOverflow中文版one know how to specify a new thread programmatically?
Update 2: I setup some workflows to run with a 5 minute delay to see if there was any pattern to the sleep cycles. The workflows slept at 5 minute intervals for around 6 hours then the timer started to increment as follows 5 minutes 15 minutes 45 minutes 1.5 hours 3 hours 6 hours 12 hours
It looks like the delay timers are being doubled for the most part. I sure MS can figure this one out, I have tons of logs and examples.
This issue has been resolved. I had forgotten to post the resolution...
Three settings needed to be modified. Workflow Throttle, Workflow Batch, and the Hidden Workflow Timer.
You can check the current throttle setting by running the following command:
stsadm -o getproperty -pn workflow-eventdelivery-throttle
Here is my new setting:
stsadm -o setproperty -pn workflow-eventdelivery-throttle -pv "45"
You can check the current batch size setting by running the following command:
stsadm -o getproperty -pn workitem-eventdelivery-batchsize
Here is my new setting.
stsadm -o setproperty -pn workitem-eventdelivery-batchsize -pv "250"
You can check the current interval setting by running the following command, in which you replace the URL with a valid path to a SharePoint application:
stsadm -o getproperty -pn job-workflow -url http://yoursiteurl
Here is my setting:
stsadm -o setproperty -pn job-workflow -pv "Every 5 minutes between 0 and 59" -url http://yoursiteurl
精彩评论