WF4: "instance owner registration for owner ID has become invalid' errors

We have an windows workflow application hosted in WCF and IIS. We have turned on tracing in this application and we are seeing a large number of

System.Runtime.DurableInstancing.InstanceOwnerException: The execution of an InstancePersistenceCommand was interrupted because the instance owner registration for owner ID 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. 

or

System.Runtime.DurableInstancing.InstanceNotReadyException: No runnable workflow instances were found errors.

The windows workflow endpoint is exposed via a WCFWorkflowService.xamlx file which has a designer file but does not have a code behind file. In this case, how would I check if "the instance handle is still valid before calling the instance store" i.e implement the solution documented here?

The SqlWorkflowInstanceStore is not exposed in my code, it is configured in my web.config file.

"windows workflow application hosted in WCF and IIS" configuration:

<system.serviceModel>     <behaviors>         <serviceBehaviors>             <behavior name="">                 <serviceMetadata httpGetEnabled="true" />                 <serviceDebug include ExceptionDetailInFaults="false" />                 <sqlworkflowInstanceStore connectionString="Data Source=                     <DatabaseConnectionString>" instanceEncodingoption="Gzip" instanceCompletionAction="DeleteNothing" instanceLockedExceptionAction="BasicRetry" hostLockRenewalperiod="68::30"     runnableInstancesDetectionPeriod="80:00:05"/>                 </behavior>             </serviceBehaviors>         </behaviors>     </system.serviceModel> 

client configuration:

<client>     <endpoint address="http://www.URLInProduction.com/WCFWorkflowService.xamlx" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService contract="WCFServiceReference.IService" name="BasicHttpBinding_IService" /> </client> 
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.