DotNetNuke Powered!
          
John Mitchell's (mostly DotNetNuke) Blog - Adding new page shows up randomly in DotNetNuke
 Sunday, November 26, 2006

In IIS 6 it is possible to assign more than one worker process to an App pool (known as a Web Garden).  This is a nice way to increase performance, but it will make your application act randomly if the asp.net cache is used.  This is because you will actually be connecting to different instances of the application which may or may not have had their cache updated when a change has been made.

The best way to correct this erratic behavior is to make sure that you are not running in a Web Garden.  To do that, you need to use the IIS manager and set the properties of the application pool your application is running under to use only one worker process.

To configure a Web garden by using IIS Manager

1.

In IIS Manager, expand the local computer, expand Application Pools, right-click the application pool, and then click Properties.

2.

Click the Performance tab, and under Web garden, in the Maximum number of worker processes box, type the number of worker processes that you want to assign to the application pool. (You must type a number greater than 1 for the application pool to become a Web garden.

3.

Click OK.

Optionally, you can configure a Web garden by setting the metabase property MaxProcesses. The MaxProcesses property determines the maximum number of worker processes that an application pool allows to service its requests. A value of zero indicates an unmanaged application pool that is not served by a worker process.

The default value for the MaxProcesses property is 1, which is the default number of worker processes that service an application pool. To configure an application pool so that it is not a Web garden, set the MaxProcesses property to back to 1.

 

11/26/2006 10:39:06 AM (Central Standard Time, UTC-06:00)  #    Comments [6]
11/29/2006 4:37:12 AM (Central Standard Time, UTC-06:00)
Suppose you wanted to take advantage of web gardens? They are useful for handling peaks in web traffic and other situations where one process on its own gets bogged down. If my site is only updated by a site admin, what procedure could they employ to get all instances of the site updated at the same time. Would opening and resaving web.config empty the cache and allow it to rebuild for both processes?

11/29/2006 8:05:09 AM (Central Standard Time, UTC-06:00)
Hi Laurence,

Yes, if you restart the app like that then it would also clear the cache in all processes.
12/6/2006 6:48:24 AM (Central Standard Time, UTC-06:00)
Thanks a million. We have a DNN 3.1 site for our school system. A couple of months ago the 'erratic' behavior started up. I've been figting, searching, and generally beating my brains out trying to pin it down. Even started building a new 03/IIS6 server with DNN4 thinking that was only way I was going to get rid of the issues. We have a class on using the DNN portal in a few minutes, so I stayed a few hours late last night, and came in a few hours early this morning. Impossible to show folks how to add stuff when the changes won't show up. Luck led me to your post.
12/6/2006 9:21:59 AM (Central Standard Time, UTC-06:00)
Great, I'm glad the post helped. Good luck on your training.
2/27/2007 3:07:17 PM (Central Standard Time, UTC-06:00)
Thanks for this blog entry John!
Me too had been searching for ages why caching was problematic.
After reading you blog I got that feeling of "Oh no ..." and yes, there were two worker processes assigned ...

6/11/2007 6:29:03 AM (Central Daylight Time, UTC-05:00)
Just a quick update for everyone. The problem still exists in DNN 4.5.3. We did some testing with a single user and the problem still occurred. If caching is switched off then the problem won't occur, however, performance on your site will grind to halt. I would strongly recommend that web gardens are not used with DNN at all. I am surprised that this has not been mentioned in the DNN configuration guide.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):