WorkflowApplication Errors + methods (Run, WaitOne, ResumeBookmark) take a lot of time to complete RRS feed

  • Question

  • Hi all.

    I'm running a custom made host for a Workflow Application.

    I'm experiencing various errors in production environment. Below an excerpt of the kind of errors i'm getting :

    "The workflow instance xxx has been aborted: The execution of an InstancePersistenceCommand was interrupted because the instance owner registration for owner ID 'zzz' has become invalid. This error indicates that the in-memory copy of all instances locked by this owner have become stale and should be discarded, along with the InstanceHandles. Typically, this error is best handled by restarting the host."

    "The execution of an InstancePersistenceCommand was interrupted because the instance 'xyz' is locked by a different instance owner. This error usually occurs because a different host has the instance loaded. The instance owner ID of the owner or host with a lock on the instance is 'zzzz'."

    In addition to this, i can see that often the basic methods of the Worfkflow Application object takes a lot of time to complete :

    for example, being wfApp an object of type System.Activities.WorkflowApplication, sometimes it takes from 1:00 up to 3:54 minutes to execute, wfApp.Load, wfApp.ResumeBookmark.

    The problem is : having no access to the System.Activities methods source code, i can't debug to find what is the reason of this strange behavior. I guess that it could be something related to multithreading / mutual locking of the threads running in the Workflow host context, but i get this long executing behavior even with one single user using the Workflow Host.

    Any suggestion on what approach should i adopt to find the errors ?

    Thank you

    Wednesday, October 28, 2015 11:43 AM