Recommended timeout for large workflows

  • 30 January 2016
  • 2 replies
  • 39 views

Badge +6

Hi There

I need some help. I have couple of large site workflows when I mean large I mean processing data in the regions of between 1000 and 5000 records. So I would like to know what is the recommended timeout one should set in the web.config in order to allow these workflows to run until they finish?

Mostly my problem is that the workflow runs perfectly and in the middle it throws a failed to start error. I remember I read one of the articles in this community which suggested increasing the timeout in the web.config and we did I am still having the issue.

This is different types of workflows doing different things as example one of them runs through a list of 1000 items and creates an extract on a text file and that's all it does and finally uses web request to drop the file in the library. If I reduce the number of records by maybe classifying a query that will return half the records, it works but as soon I return all the records it fails before it is finished and it throws that failed to start error.

Your help will be appreciated.


Regards

Bhuti


2 replies

Userlevel 7
Badge +11

Hi Bhuti,

I'll let others comments on the timeout, as I don't know about that.

But one thing I would recommend, is potentially building some logic into your workflow, that after a 100 or 500 processed items, use a Pause action.

This all depends on how time sensitive this process is.  If it's happening over night, then it's probably not an issue.

Vadim

Userlevel 4
Badge +8

Along the line's of Vadim Tabakman​'s suggestion, you might also want to put a Pause action as the very first action in your workflow.  This will "force the workflow instance to immediately dehydrate and persist to the SharePoint Content Database".  Then the workflow will be processed by the SharePoint Timer Service (OWSTimerexe) instead of by the IIS Worker Process (W3Wp.exe).

Check out this post: Defensive Workflow Design Part 4 - Slow Down and Speed Up which goes into a lot more detail.  I'm not certain, but if you make this change the timeout from web.config might no longer be an issue at all.

Reply