Skip to main content
Nintex Community Menu Bar
On-premise Nintex workflow in 2019 failing with "Workflow failed to Start" after executing some iterations in For each loop. For each needs to finish 2300 iterations , but it failed to start after 999. What can be the reason or workaround?

Hi @Priya_Verma





It appears you might be hitting some kind of memory/work limit in the workflow, sadly there are no fixed numbers on this as I believe for the workflow it can depend on SP performance.





If you are working on many items like this, I personally prefer to not use 1 workflow to perform all repeat actions but instead build a workflow on the list they are located that runs a new instance for each item, that way each record gets its own workflow instance.





Without seeing the workflow or logic it is employing I wouldn't be able to advise in detail a course of action.





I can see you have a case open for this issue, please reach out to the engineer and request they contact me to assist with a workflow review.





Kind regards



Jake


As a person who has needed to loop over an entire list of items to update some tiny little piece of data, I've ran into this problem as well.





For me the workaround was seeing what the max amount of loops were being allowed in the Central Admin settings for Nintex Workflow and then adding in a Pause Workflow for 5 Minutes action once my loop reached a certain threshold near that number, before continuing.





Note that you could technically turn off the looping max for a timer job and it'll let you do it, but just be warned that by doing massive loops workflows (restricted or otherwise) you're likely going to tank the resources on your server in a way that will be noticeable to users. I do not recommend doing Big Loops while people are actively working in SP, even if you ARE using pauses!





To find the settings in question to better guide you, first go to Central Admin as shown below





1. Central Admin:







2. Nintex Administration:







3. Security:







To make the threshold ticker in a workflow is simple enough. Just make an integer variable in your Workflow, and increment it at the start of your For Each loop. At the end of the loop, check the value and if it's near the Max Loop Iterations, Run If -> Pause Workflow for 5 Minutes. After the Pause, set the ticker Integer variable back to 0 and keep on loopin!





Hope this helps! Let me know if you need additional instructions or help!












Hi MegaJerk,



Thank you for your reply. I paused the workflow for 5 minutes when it is reaching 500 and 990, as a result it failed to start after doing only 330 iterations. I updated maximum loop threshold to 2500 and checked the workflow execution, it also did not help.



Regards,



Priya


Hi Jake,
Thanks for providing your view. This is a site workflow which is updating list depending upon the webservice result, So we have to process all results in the same workflow. If there would have a way to bifurcate the collection in 2-3 , I think that would have also helped in successfully completing the workflow, But I could not find that.I have asked my Nintex engineer to check with you.
Regards,
Priya

if it's failing after a certain amount regularly, can you try adding the pause before you reach that amount?


Hi MegaJerk,
After putting pause of 5 minute, I could process for each till 1530 index, after that even though pause is there , it is failing after resume. then I paused at 1525, but still it is failing after resume.

Reply