cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

How do you stop a running infinite loop?

Jump to solution

I have a user that has an infinite loop going, and not sure how to kill it. Even after terminating the workflow it is still running (sending email notifications). Safe looping is not enabled due to business requirements. Any suggestions?

Labels: (2)
Tags (2)
0 Kudos
Reply
8 Replies
Community Manager Community Manager
Community Manager

Re: How do you stop a running infinite loop?

Jump to solution

You may have to delete the item and then look in your timer jobs to kill that job.  The timer job is almost your last resort but if you really need it to stop, I would go there and kill the timer job that is running.  This will affect any and all other workflows within that site collection or web app, but again that should do the trick.

0 Kudos
Reply
Workflow Hero

Re: How do you stop a running infinite loop?

Jump to solution

Eric, we had some scheduled maintenance run at 1am, that I think kills timer jobs; in any case the moment the maintenance began, the loop was killed. For future readers, deleting the item (and clearing from the recycle bin) and deactivating the Nintex features for the site collection had no effect. Interestingly, when I reactivated Nintex, the workflow reappeared, so I don't know if manually deleting the workflow itself (after exporting it first, of course) would have made a difference. It would be nice if Ninex provided steps for how to kill an infinite loop, should it happen--even when safe looping is enabled (as safe looping doesn't kill an infinite loop, it only slows it down). For some environments, safe looping isn't a viable option due to business requirements workflows serve.

Thanks for your quick response, it did help move the discussion along with our admins. Shalom.

0 Kudos
Reply
Workflow Hero

Re: How do you stop a running infinite loop?

Jump to solution

If you are stuck in a loop and safe looping is on, you should have no issue going to the workflow status page and hit Terminate Workflow(or End this workflow).

I've killed an infinite looping workflow with safe looping off the same way before. Was this not an option, or did it error when terminating?

0 Kudos
Reply
Workflow Hero

Re: How do you stop a running infinite loop?

Jump to solution

For the non-safe looping off scenario, I see what you meant know, sorry. Once you terminate the workflow, all of the already delivered actions to the engine will fire. Once you terminate, there will be no more items generated or activities to be worked on. So yes, the only way to stop that is to stop the timer job or wait it out.

0 Kudos
Reply
Not applicable

Re: How do you stop a running infinite loop?

Jump to solution

Hello there... no solution for this?  We have a similar situation in our production environment.  We have restarted the SP time job.  No luck.  The WF, the items are deleted and cleared the recycle bin as well.  Thanks for any help...

0 Kudos
Reply
Workflow Hero

Re: How do you stop a running infinite loop?

Jump to solution

So you restarted the timer job, deleted items that the workflow was started but the workflow is still running?

0 Kudos
Reply
Not applicable

Re: How do you stop a running infinite loop?

Jump to solution

Yep.  It didn't

Raised a High prio ticket to Nintex, but they never got in touch so far.

We decided to leave it as it is for the night since the WF was just sending notifications and did not have any major computations (hoping that Nintex will get back by then).  The CPU/DB usage was also manageable, not too high.  It finally stopped sending emails after 11 hours...

0 Kudos
Reply
Community Manager Community Manager
Community Manager

Re: How do you stop a running infinite loop?

Jump to solution

Sumit,

Following up to what Andrew shared. Can you verifiy the following:

  1. Deleted associated workflows and items.
  2. Navigate to the Nintex Workflow Management area in the site collection settings and delete/purge the associate workflow. (please save/export this first)
  3. Check the link to ensure you've restarted the correct timer job  Timer job reference (SharePoint 2013)
  4. https://technet.microsoft.com/en-us/library/Cc678870.aspxCheck out the NWAdmin.exe tool to see about purging the workflows from the database.

Those steps should help resolve the issue.

0 Kudos
Reply