Workflow Service stops responding after 464 messages

I am having a peculiar issue while executing workflows.
I have tried everything I could think of and now need ideas.

Here is my configuration:
1. A WF4 Workflow Service (xamlx) hosted in IIS 7 and uses net.msmq/netMsmqBinding for transport (MSMQ is transactional).
2. No Workflow Persistence is used.
3. I use a console app client to send messages to the workflow (each message creates new workflow). 4. Each workflow looks like: Wait for START message -> Wait for END message (I only send START messages).

If I send 500 messages - 464 get processed correctly, but above that all messages go to the lock_* queue and then move to poison queue. I have inspected Debug, Analytic event logs, as well as messages and trace svclogs Here is most detailed message I get:

System.TimeoutException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089The operation did not complete within the allotted timeout of 00:00:30. The time allotted to this operation may have been a portion of a longer timeout. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activities.Dispatcher.PersistenceProviderDirectory.LoadOrCreateAsyncResult.HandleReserveThrottle(IAsyncResult result) at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)System.TimeoutException: The operation did not complete within the allotted timeout of 00:00:30. The time allotted to this operation may have been a portion of a longer timeout. at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Activities.Dispatcher.PersistenceProviderDirectory.LoadOrCreateAsyncResult.HandleReserveThrottle(IAsyncResult result) at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)

at that point request to http://localhost/MyWebService?wsdl also fails with 404.

If I restart IIS - everything goes back to normal until 464 messages are sent.

  • Where can I find more detailed log? (I already have System.Diagnostics set to max verbosity)
  • Is number 464 magic at all?
  • What can be causing this web service locking up?

  • It sounds like you are running into the throttling limits, these settings apply to WF4 as much as they do to WCF. The maxConcurrentInstances setting sets the maximum number of workflow instances that can be in memory at a given time.

    <behaviors> 
      <serviceBehaviors> 
        <behavior name="WorkflowServiceBehavior"> 
          <!-- Specify throttling behavior -->
          <serviceThrottling maxConcurrentInstances="1000"/> 
        </behavior>
      </serviceBehaviors>
    </behaviors>
    

    Just as an aside you should always use persistence when hosting in IIS. Sooner or later IIS is going to restart the AppDomain and if the WorkflowServicehost can't save the state of the workflow instances to disk they will be lost. It will also mean that idle workflow instances can be removed from memory and don't count against the maxConcurrentInstances which is an in memory restriction.

    链接地址: http://www.djcxy.com/p/95890.html

    上一篇: WF4:工作流保持锁定状态

    下一篇: 工作流服务在464消息后停止响应