I'm working on SharePoint 2013 workflow, when I'm trying to looping all items, the workflow is terminating and getting error of

The workflow instance was too large to persist (over 5120 kilobytes).


It's the default value (5MB) set to the property "WorkflowServiceMaxInstanceSizeKB" by Microsoft, for best performance you need to keep the workflow instance size less than 600KB. Where in your case your workflow instance has exceeded the default value. To keep up the performance, you can use a series of small workflows to achieve your demand or if you want to increase the value, then use the below powershell command to increase value,

Set-WFServiceConfiguration -ServiceUri http://workflowmanagerurl:12291/ -Name “WorkflowServiceMaxInstanceSizeKB” -Value 30720


  1. I'm setting the Value to 30720(which is 30.2 MB)

  2. To get the workflow manager URL (ServiceUri), use the below powershell commands,

    Add-PSSnapin Microsoft.SharePoint.PowerShell
    $wfProxy = Get-SPWorkflowServiceApplicationProxy            
    $wfProxy.GetWorkflowServiceAddress((Get-SPSite -Limit 1 -WarningAction SilentlyContinue))
    Remove-PSSnapin Microsoft.SharePoint.PowerShell


After doing the above mentioned steps, then you have to restart the ‘Workflow Manager Backend’ windows service in order for settings changes to be picked up.

For more information about SharePoint Workflow Architecture, you can refer to the article:


| improve this answer | |
  • what is the value 30720, can I use other value. what url I have to use for workflowmanager url – Lavanya Puppala Dec 18 '15 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.