WF4:工作流服务停止接受新请求
我通过 WorkflowServiceHost 类托管一个小型工作流程。
using (WorkflowServiceHost wfHost = new WorkflowServiceHost(new QueueWorkflow(), new Uri("net.pipe://localhost/workflow")))
{
wfHost.Open();
Console.ReadLine();
}
此工作流通过使用接收活动的传入 WCF 调用(当前为 NetPipe 绑定)启动,进入自定义活动执行一些工作,然后创建书签并进入空闲状态(不卸载)。
所有这些一开始都运行良好,但是当我将负载测试器设置为启动 1000 个工作流时,928 个工作流实例启动并继续创建书签,其余 72 个块在 WCF 或接收活动中。
- 测试始终在 928 工作流实例处停止。 (可能是工作流内存限制?)
- 恢复其中一个工作流并允许其运行完成,可以开始阻止的启动请求列表中的下一个工作流。
任何想法都非常感激。
I am hosting a small workflow via the WorkflowServiceHost class.
using (WorkflowServiceHost wfHost = new WorkflowServiceHost(new QueueWorkflow(), new Uri("net.pipe://localhost/workflow")))
{
wfHost.Open();
Console.ReadLine();
}
This workflow starts via an incoming WCF call (currently NetPipe binding) using a Receive activity, proceeds into a custom activity does some work and then creates a bookmark and goes idle (does not unload).
All this worked well at the beginning, however when I have my load tester set up to start 1000 workflows, 928 workflow instances start and proceed up to creating their bookmark, the remaining 72 block either in WCF or in the Receive activity.
- The test always stops at 928 workflow instances. (A workflow memory restriction maybe?)
- Resuming one of the workflows and allowing it to run to completion allows the next workflow in the list of blocked starting requests to begin.
Any ideas greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑 serviceThrotdling 正在发挥作用这里。它不仅影响 WCF,还与 WF4 运行时一起使用。尝试更改设置,看看是否会有所不同。
请参阅此处了解我写了一篇关于它的博客文章。
I suspect serviceThrottling is playing a role here. It doesn't just affect WCF but is also used with the WF4 runtime. Try changing the settings to see if it makes a difference.
See here for a blog post I wrote about it.