locked
Persistence error - System.ServiceModel.FaultException: The workflow has been aborted RRS feed

  • Question

  • Hi all,

    I have a workflow service in Workflow 4.0 that threw a strange exception. It happened once (until now), this service has been running from a long time (2 months) without any issue. Further tests did not throw anything like this at all. I have a custom IO participant that picks some data and stores it into an external data source (SQL Database), and the error seems to happen somehow during persistance.

    Here is the trace from svclog:

    <ExceptionType>System.ServiceModel.FaultException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
    <Message>The workflow has been aborted.</Message>
    <StackTrace>
    at System.Runtime.Diagnostics.EtwDiagnosticTrace.WriteExceptionToTraceString(XmlTextWriter xml, Exception exception, Int32 remainingLength, Int32 remainingAllowedRecursionDepth)
    at System.Runtime.Diagnostics.EtwDiagnosticTrace.ExceptionToTraceString(Exception exception, Int32 maxTraceStringLength)
    at System.Runtime.Diagnostics.EtwDiagnosticTrace.GetSerializedPayload(Object source, TraceRecord traceRecord, Exception exception, Boolean getServiceReference)
    at System.Runtime.TraceCore.HandledExceptionWarning(EtwDiagnosticTrace trace, String param0, Exception exception)
    at System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.AbortInstance(Exception reason, Boolean isWorkflowThread, Boolean shouldTrackAbort)
    at System.ServiceModel.Activities.Dispatcher.WorkflowServiceInstance.OnPersistenceContextClosed(Object sender, EventArgs e)
    at System.ServiceModel.Channels.CommunicationObject.OnClosed()
    at System.ServiceModel.Channels.CommunicationObject.Abort()
    at System.ServiceModel.Activities.Dispatcher.PersistenceContextEnlistment.DoRollback(Object state)
    at System.Runtime.ActionItem.DefaultActionItem.TraceAndInvoke()
    at System.Runtime.ActionItem.CallbackHelper.InvokeWithoutContext(Object state)
    at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    </StackTrace>
    <ExceptionString>System.ServiceModel.FaultException: The workflow has been aborted.</ExceptionString>
    </Exception>
    

    Here is my service configuration:

    <system.serviceModel>
      <bindings>
        <wsHttpBinding>
          <binding
            maxReceivedMessageSize="512000"
            name="MyBinding"
            closeTimeout="00:01:00"
            openTimeout="00:01:00"
            receiveTimeout="00:01:00"
            sendTimeout="00:01:00"/>
        </wsHttpBinding>
      </bindings>
      <diagnostics etwProviderId="some guid">
        <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxSizeOfMessageToLog="2147483647"/>
        <endToEndTracing propagateActivity="true" messageFlowTracing="true"/>
      </diagnostics>
      <extensions>
        <behaviorExtensions>
          <add name="CustomExtension" type="MyCompany.Workflow.Activities.Extensions.CustomExtensionElement, MyCompany.Workflow.Activities"/>
        </behaviorExtensions>
      </extensions>
      <behaviors>
        <serviceBehaviors>
          <behavior name="Workflow.CustomBehavior">
            <serviceMetadata
              httpGetEnabled="true"/>
            <serviceDebug
              includeExceptionDetailInFaults="true"/>
            <sqlWorkflowInstanceStore
              instanceCompletionAction="DeleteAll"
              instanceEncodingOption="GZip"
              instanceLockedExceptionAction="NoRetry"
              connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString"
              hostLockRenewalPeriod="00:00:30"
              runnableInstancesDetectionPeriod="00:00:02"/>
            <workflowInstanceManagement
              authorizedWindowsGroup="Administrators"/>
            <workflowUnhandledException
              action="Abandon"/>
            <workflowIdle
              timeToPersist="00:00:00"
              timeToUnload="00:00:00"/>
            <CustomExtension/>
            <etwTracking
              profileName="HealthMonitoring Tracking Profile"/>
          </behavior>
        </serviceBehaviors>
      </behaviors>
      <services>
        <!--My service-->
        <service name="WorkflowService" behaviorConfiguration="Workflow.CustomBehavior">
          <endpoint binding="wsHttpBinding" bindingConfiguration="MyBinding" contract="IWorkflowService"/>
          <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex"/>
        </service>
      </services>
      <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true"/>
    </system.serviceModel>

    This happens when I create a new instance, when the workflow is persisting this concrete instance. This happened once and no other action such as an iisreset took place at the same time.

    Is there any known issue or fix arround this situation?

    Thursday, January 10, 2013 11:46 AM