Click here to Skip to main content
Licence 
First Posted 17 Jan 2006
Views 20,327
Bookmarked 19 times

Configuring machine.config to recycle aspnet_wp

By | 17 Jan 2006 | Article
Configuring machine.config to recycle aspnet_wp

Configuring machine.config to recycle aspnet_wp

There has been a lot of times when we feel that our application is slowing down or the ASP.Net worker process is not working as its best. Although ASP.NET does recycle its process after certain number of requests or memory Limit but there are times when you feel that you could control these parameters and explicitly restart the worker process.

It is possible to restart the worker process explicitly after a certain number of requests.

In Machine.config under <configuration> <system.web><procesmodel> we have an attribute called requestLimit.

Set this request Limit to the number of requests after you want to recycle your worker process. It can be set to Infinite or any particular number. The default setting is 5000.

Suppose if we set to it say 10 then you will notice that after every 10 requests aspnet_wp process will be recycled. You can note the process id's to feel the change.

Second reason coz of which we may want our process to be recycled is because of high consumption of memory.

In Machine.config under <configuration> <system.web><procesmodel> we have an attribute called memoryLimit. Set the threshold to the amount you want. The default is 60 i.e. 60%. The moment this threshold is reached aspnet_wp will be recycled.

Before we make any changes to the machine.config we must remember that these changes are going to affect all the applications on that machine coz we are these changes at the core level. Hence after making these changes we should bench mark all our applications.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Namratha Shah

Architect

United States United States

Member

Namratha Shah a.k.a. Nasha is from orginally from Bombay, India but currently residing NJ, USA. She has to her credit, a Bachelor’s Degree in Microbiology and Biotechnology and a Master's in Computer and Software Applications (1999-2001) from Somaiya College Bombay. She started her career with C and C++ and then moved on to Microsoft Technologies. She has over 7.5 years experience in software architecture, design and development. She is a Certified Scrum Master and a member of the CORE .NET Architecture team. She has been Awarded with Microsoft’s Prestigious Most Valuable Professional (MVP) twice consecutively in years 2005 and 2006 in Visual C#.NET for her outstanding contributions to the .NET community.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 17 Jan 2006
Article Copyright 2006 by Namratha Shah
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid