SimonF
SimonF

Reputation: 824

Windows Workflow Foundation and IIS ApplicationPool recycle (particularly after editing Web.config)

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.

Upvotes: 0

Views: 758

Answers (2)

Ron Jacobs
Ron Jacobs

Reputation: 3279

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

Upvotes: 1

Matthew Steeples
Matthew Steeples

Reputation: 8078

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.

Upvotes: 1

Related Questions