Question

I really need some help understanding the "5000 request limit" i keep hitting when working with a 2013 workflow.

I have created a rather large workflow for a client which loops through 400 items and updates/creates a total of 800 items in another list.

But when I run the workflow it is getting suspended.

For testing purposes I have created a really simple workflow on another O365 domain. It updates the title of an item, logs to the workflow history and then looping back doing it all over again. this is supposed to run for 7K times (expecting it to hit the limit around the 5000 mark).

Here's the part that I cannot wrap my head around: After just 764 updates the workflow is suspended telling me that I have hit the 5000 request limit. Even if i count every update plus the log to the workflow history I only end up getting just slightly more than 1500 requests.

I have read this article from Microsoft on the subject (https://support.microsoft.com/da-dk/help/3076399/sharepoint-2013-workflow-throttling-and-performance-in-sharepoint-onli) - but I donøt quite understand why such a simple loop can reach the limit?

Can anybody shred some light upon how this actually work? Please note that I'm not asking for ideas on how to change the existing workflow, but merely to understand the 5000 request limit. Also please note I'm not asking about the 5000 view limit!

Was it helpful?

Solution

MSDN says that, The "Log to History List" action may generate five or more requests during a healthy operation. (May be more in problematic retry logic)

As per this, If you are using "Log to History List" action in loop which looping for 800 times then possibly 4000 (800*5) logs will be added in history list. ( possibly 4000, may be more/less)

Plus your total 800 calls for create item and update item. SO in this case, tentative 4800 requests will be generated for single workflow instance. Now as per Microsoft, only 5000 requests can be generated by single workflow instance within 24 hours period. If this limit exceeds then the workflow will be suspended by the Workflow service.

Many actions produce requests, and requests can be minimized by using best practices. For example, you can use a single Update List Item action instead of multiple Set Field in Current Item action to reduce the number of requests being made by a workflow. Source

So, try to calculate your actual request/calls done by single workflow instance.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top