SharePoint Workflows: Failed on Start (retrying)

At one of my clients, I’m using a pretty simple SharePoint Designer workflow to manage their Purchase Order approval process.  About half the time, the workflow runs fine.  The other half, the workflow instance gets stuck with the status ‘Failed on Start (retrying)’.  If I terminate the “stuck” instance and fire it off again manually, it runs fine, so I don’t think that it’s a bug in my code or bad data.

The environment is WSS and seems to be up to rev on all of the patches and hotfixes.  There aren’t any other workflows running, though folks at the client have done some experimenting, so workflows have been running in the past.

Looking around the Web, this doesn’t seem to be a unusual occurrence, but I haven’t found anything authoritative enough to explain it.  One suggested fix is to reset the WWF counters by running this command:

Lodctr /R c:WindowsMicrosoft.NetFrameworkv3.0Windows Workflow Foundationperfcounters.ini

We ran it, and everything seems to be working fine now.  I’ll update this post if we learn anything more…

2008-10-13

Alas, the attempt to fix things above did not seem to work. The documents are all being submitted by one person, and there still doesn’t seem to be any pattern to the successes vs. failures.  Whenever the workflows are getting stuck, I’m seeing a permission error in the logs like this:

10/13/2008 08:52:33.66     w3wp.exe (0x178C)                          0x047C     Windows SharePoint Services     Workflow Infrastructure         98d8     Unexpected System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))     at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)     at Microsoft.SharePoint.Library.SPRequest.AddWorkItem(String bstrUrl, Guid& pWorkItemId, DateTime& pDeliveryDate, Guid workItemType, Guid workItemSubType, Guid parentId, Int32& pItemId, Boolean bRememberWebId, Guid& pItemGuid, Guid& pBatchId, Int32 userId, Object varBinaryPayload, String pwzTextPayload, Guid processingId, Boolean bAutoDelete)     at Microsoft.SharePoint.SPWorkItemCollection.Add(DateTime deliveryDate, Guid workItemId, Guid workItemSubType, Int32 itemId, Guid batchId, Guid itemGuid, Boolean rememberWebId, Int32 userId, Byte[] binaryPayload, String textPayload, Boo… 

10/13/2008 08:52:33.66*    w3wp.exe (0x178C)                          0x047C     Windows SharePoint Services     Workflow Infrastructure         98d8     Unexpected …lean inProgress, Boolean autoDeleteOldUnprocessedEvents)     at Microsoft.SharePoint.Workflow.SPWorkflowPendingEventCollection.Enqueue(SPWorkflowEvent workflowEvent, DateTime deliveryTime, SPRunWorkflowOptions runOptions)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)

I think that the error being a permissions one may be misleading, but I’ve tried bumping up the permissions for the person who is submitting the documents to the library to Full Control anyway.

Similar Posts

4 Comments

  1. awright:
     
    I’ve since moved on from that job and thus that client.  The issue was intermittent at best, so I never really figured it out.  In any case, for my client Vista wasn’t part of the mix, so it couldn’t have been part of the problem.  In fact, with my Vista machine I rarely saw the issue; with XP machines it was more frequent.
     
    If you have further ideas, I’d appreciate hearing them.
     
    M.
  2. I am having the same problem.  Also have it where the workflow gets stuck in the "Starting" phase too.  Seems to work fine when you manually kick of the workflow.  Seem to have only come across these intermittent problems when using workflow on a document library, lists and form libraries seem to be more robust.

    We initially thought it was a problem with vista clients that would take an age saving the document to SharePoint from word.  Thus the document not be checked in ready for the workflow which would kick of before it.

    We have since fixed the vista problem so that saving documents to the SharePoint library happens alot quicker, but we are still having the same issues with the OOTB approval workflow.

  3. Hey

    I am having the same problem. The only difference is that my workflow works fine but it fails to stop. i have some activities that runs for like 10 min and after that the status of the workflow goes to “Failed to start”. the activities continues in good order but the workflow never goes into “Completed” status.

    Hope someone discovered a solution.

    Best Regards
    Marian

    1. My guess is that if the workflow “fails to stop” you’ve got some issue with how you’ve constructed it. (Of course, I could be wrong!) SPD workflows are tough little beasties to debug.

      M.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.