Windows Workflow Foundation 和 IIS ApplicationPool 回收(特别是在编辑 Web.config 之后)

发布于 2024-09-18 04:11:13 字数 510 浏览 6 评论 0原文

我参与测试一个 ASP.NET MVC 站点,该站点使用作为单独站点托管在同一 IIS 服务器上的 WF 服务。

目前,我们使用 Log4Net 来协助阶段和生产中的诊断,因此系统管理员会定期将日志记录级别设置为从 WARN 到 DEBUG,并在短时间内再次设置回来,以便捕获日志。

当编辑 WF 服务站点的 web.config 时,我注意到 WF 服务出现一些奇怪的行为(或者可能我只是不太了解 WF。)我知道 IIS 会监视 web.config 并在以下情况下强制 AppPool 回收:它被修改了,但令我困惑的是,WF 服务似乎处于休眠状态,直到它下次收到服务请求。这意味着所有正在等待计时器的待处理工作流将不执行任何操作,直到第一个服务请求后 AppPool 回收,然后所有先前触发的工作流将立即全部触发。

我希望这只是我们忽略的一些简单的配置设置,但我们将不胜感激,如果有的话,请随时给我一个带链接的 RTFM :)

编辑:哇,这里没有 WF 的爱。我们仍然把这个问题放在次要位置,更重要的是要煎炸,但这个问题仍然让我非常担心。

I am involved in testing an ASP.NET MVC site that uses a WF service hosted as a separate site on the same IIS server.

We currently use Log4Net to assist with diagnostics in Stage and Production, so sysadmins are regularly setting the logging levels from WARN to DEBUG and back again for brief periods in order to capture logs.

I've noticed some strange behaviour with the WF service when the WF service's site's web.config is edited (or maybe I just don't understand WF well enough.) I understand that IIS watches the web.config and forces an AppPool recycle when it is modified, but what confuses me is, the WF service seems to hibernate until it next receives a service request. This means that all pending workflows which are waiting on timers will do nothing until the first service request post-AppPool-recycle and then all the ones that would have fired earlier will fire all at once.

I'm hoping this is just some simple config setting we've overlooked, but any help would be most appreciated, and feel free to give me an RTFM with link if so :)

Edit: Wow, no WF love on here. We've still got this issue sitting on the backburner, more important fish to fry but this problem still concerns me greatly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

兮颜 2024-09-25 04:11:13

这是 IIS 的问题。基本上,在收到应用程序池的请求之前,IIS 不会启动应用程序池。如果修改了 web.config,而且在一段时间内(我认为是 10 分钟)没有对您的站点发出请求,也会发生这种情况。

解决方案是使用 Microsoft 的此实用程序来“预热”IIS。它模拟第一个请求以确保应用程序池始终运行。

希望这有帮助。

This is a problem with IIS. Basically IIS doesn't start up the app pool until a request is received for it. This will happen if web.config is modified but also if there are no requests to your site for a period of time (I think 10 minutes).

The solution to this is to "Warm up" IIS using this utility from Microsoft. It simulates the first request to make sure that the app pool is always running.

Hope this helps.

朮生 2024-09-25 04:11:13

Windows Server AppFabric 具有 WorkflowManagement 服务,它将在回收后重新启动工作流。

Windows Server AppFabric has a WorkflowManagement Service which will restart the workflows after a recycle.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文