How do you stop a running infinite loop?

  • 3 November 2014
  • 6 replies
  • 109 views

Badge +3

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?


6 replies

Badge +17

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.

Badge +3

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.

Userlevel 7
Badge +17

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?

Userlevel 7
Badge +17

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.

Userlevel 7
Badge +17

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

Badge +17

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.

Reply