Increase SharePoint Workflow performance and reliability

We encountered several scenario’s where workflows did not start correctly or the workflow did not continue after a pause action. 1 error we have seen is as follows:

AutoStart Workflow: Microsoft.SharePoint.SPException —> System.Runtime.InteropServices.COMException (0x8102008A): <nativehr>0x8102008a</nativehr><nativestack></nativestack>

at Microsoft.SharePoint.Library.SPRequestInternalClass.AddWorkflowToListItem(String bstrUrl, String bstrListName, Int32 lItemID, Int32 lItemLevel, Int32 lItemVersion, Guid workflowPackageId, Guid& pWorkflowInstanceId, Guid workflowTaskListId, String bstrStatusFieldInternalName, Int32 lAuthorId)

at Microsoft.SharePoint.Library.SPRequest.AddWorkflowToListItem(String bstrUrl, String bstrListName, Int32 lItemID, Int32 lItemLevel, Int32 lItemVersion, Guid workflowPackageId, Guid& pWorkflowInstanceId, Guid workflowTaskListId, String bstrStatusFieldInternalName, Int32 lAuthorId)     –

— End of inner exception stack trace —

at Microsoft.SharePoint.Workflow.SPWinOeEngine.CreateWorkflow(Object context, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bCreateOnly)

at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(Object context, SPWorkflowAssociation association, DateTime elevationTimeUtc, SPWorkflowEvent startEvent, SPWorkflowRunOptions runOptions)

at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.<>c__DisplayClass1.<AutoStartWorkflow>b__0(SPSite superUserSite, SPWeb superUserWeb)

I have collected a few settings that can be changed to increase performance or the reliability of Workflows in SharePoint.

1. Increase Throttle Size
2. Increase Batch Size
3. Time-Out
4. Workflow Timer interval
5. Event Delivery Throttle
6. Central Administration Time-Out

1. Increase Throttle Size

The workflow throttle setting controls how many workflows can be processed at any one time on the entire server farm

Use the following command to get the default value

stsadm -o getproperty -pn workflow-eventdelivery-throttle

You can change this value with the following command

stsadm -o setproperty -pn workflow-eventdelivery-throttle -pv “25”

image

2. Increase Batch Size

Batch size property controls how many work items waiting to be processed by the timer service will be executed in each run

Run the following command for the default value

stsadm -o getproperty -pn workitem-eventdelivery-batchsize

Run the following command to change this value

stsadm -o setproperty -pn workitem-eventdelivery-batchsize -pv “200”

image

Next start Central Administration and navigate to “Manage services on server”

image

Click on “Microsoft SharePoint Foundation Workflow Timer Service”

image

image

Also change this setting to for example 200

3. Time-Out

Timeout specifies the maximum time which can be taken to complete the workflow timer job in minutes.

Run the following command for the default value

stsadm -o getproperty -pn workflow-eventdelivery-timeout

Run the following command to change this value

stsadm -o setproperty -pn workflow-eventdelivery-timeout -pv “10”

image

4. Workflow Timer interval

Workflow timer Interval shows how often SPtimer job should run to process workflow items.

Use the following command to get the default value

stsadm -o getproperty -propertyname “job-workflow” -url https://portal.sharepointfire.com

You can change this value with the following command

stsadm -o setproperty -propertyname “job-workflow” -propertyvalue “every 2 minutes between 0 and 59” -url https://portal.sharepointfire.com

image

5. Event Delivery Throttle
The WorkflowEventDeliveryThrottle parameter is used to throttle the workflow events

Run the following command for the default value

stsadm -o getproperty -pn workflow-eventdelivery-throttle -url https://portal.sharepointfire.com

Run the following command to change this value

stsadm -o setproperty -pn workflow-eventdelivery-throttle -url https://portal.sharepointfire.com -pv “30”

image

6. Central Administration Time-Out

This is the same procedure as described in http://www.sharepointfire.com/2013/03/cannot-display-the-webpage-while-creating-a-web-application-in-sharepoint/

Leave a Reply

Your email address will not be published. Required fields are marked *