Welcome to AspAdvice Sign in | Join | Help

More AppDomain recycles in v2

Scott Forsyth blogged about noting more AppDomain restarts with v2.0 nowadays than with v1.1. And it seemes to be feature in v2.0 since creating non-application folders also causes AppDomain to restart (see great explanation and followup links in the post).

It makes me instantly think that could this be configurable somehow, is it possible to exclude folders from the 'watch list' in web.config?  Could such change be included in a SP or something? From session management standpoint, there's always chance to use out-of-proc mode (and perhaps running in-place precompilation in case required), but still there's the catch that it's unexpected behaviour, especially when you are used to v1.1 principles, as it does prevent those 'quick updates' or at least make think them carefully.  Especially if you use caching heavily, since AppDomain restart does wipe cache...

I'd say that this would need to be configurable. There's the catch that modifying web.config also does restarts but at least it would give chance to prepare for updates.

EDIT: I just learned that DmitryR from MS has released disk-based ASP.NET caching module, it's available here: http://blogs.msdn.com/dmitryr/archive/2005/12/13/503411.aspx

It's especially interesting in this light because it's meant to overcome the problem with process/AppDomain restarts. Here's snippet from Dmitry's post

Goals of Disk Output Cache

  1. Preservation of cached output across app domain and process restarts.  Memory-based output cache only holds on to the responses while the app domain is alive, thus all responses must be re-created after the app domain shuts down.  Disk output cache will serve cached response after app domain (or the worker process) is re-started.  Thus disk output cache should be helpful when responses could be cached for a long time and are expensive to re-recreate.
  2. Avoiding using memory for cached responses. Disk output cache [by default] uses Response.TransmitFile API to send the response directly from disk, thus reducing the memory use, especially when cached responses are large and there are many of them, as in vary-by cases.

Very cool, even though I'd still want the configurability into non-application folder scenario. :-)

Published Wednesday, February 22, 2006 8:46 AM by joteke
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below