WOrkflow 运行时和 IIS 应用程序池如何一致?
我们使用 WCF 和 IIS 7 托管工作流。我注意到的一件事是,当应用程序池达到空闲时间时,工作流将卸载并保留到数据库。
然后,当我们运行另一个工作流程时,旧的持久/卸载工作流程会再次恢复并运行。为什么会发生这种情况?
如果您有长时间运行的工作流程,是否必须将空闲时间设置为超过运行时间最长的工作流程的运行时间?
使用 WCF 在 IIS 中托管工作流的最佳内存管理是什么?
我知道你需要IIS回收应用程序池来释放内存,但是如果你有这么长的空闲时间,IIS会保留内存并且它不能很好地释放内存,即使工作流程已经完成了。如果我们缩短空闲时间,则 IIS 会认为应用程序池没有执行任何操作,然后进行回收并卸载工作流。
谢谢
We are hosting worklfows with WCF and IIS 7. One thing I have noticed is that when the app pool reaches the idle time, the workflow unloads and persists to the DB.
Then when we run another workflow, the old persisted/unloaded workflow resumes itself again and both run. Why is this happening?
If you have long running workflows, do youu have to set the on idle time to more than what the longest running workflow will run for?
What is the best memory management with hosting workflows in IIS with WCF?
I know you need IIS to recycle the app pool for the memory to be released, but if you have the idle time so long, IIS will keep the memory and it doesn't do a good job of releasing the memory, even though the workflow has finished. If we make the on idle shorter it seems like IIS thinks the app pool is not doing anything and then recycles and the workflow is unloaded.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IIS 可能被配置为在空闲后关闭工作进程。这意味着当运行到应用程序池中的 WCF 达到空闲时间时,IIS 会关闭工作进程 w3wp.exe,并且 WCF 会自行保留。当您运行第二个工作流程时,w3wp.exe 将再次启动,这就是为什么您可以看到两个 WCF 再次运行,但如果其中之一再次达到空闲时间,IIS 将再次关闭 w3wp.exe 进程。
Probabily IIS is configurated to Shutdown worker processes after being idle. That means when the WCF that is runnig into the application pool reach the idle time IIS shutdonw the workprocess w3wp.exe and the WCF persist Itself. When you run the second workflow the w3wp.exe will be started again that why you can see both the WCF running again but if one of them reach again the idle time IIS will shutdown again the w3wp.exe process.