Why Even Recycle an Application Pool: why recycle the webserver

Rate this post

I have a .NET web application that has been thoroughly vetted. It loads a cache per appdomain (process) whenever one starts and can not fully reply to requests until it completes this cache loading.

I have been examining the settings on my application pools and have started wondering why I was even recycling so often (once every 1,000,000 calls or 2 hours).

What would prevent me from setting auto-recycles to being once every 24 hours or even longer? Why not completely remove the option and just recycle if memory spins out of control for the appdomain?

 

For any query or issue, feel free to discuss on http://discuss.eduguru.in

2 thoughts on “Why Even Recycle an Application Pool: why recycle the webserver

  • February 24, 2014 at 5:58 pm
    Permalink

    You should probably be looking at recycling from the point of view of reliability. Based on historical data, you should have an idea how much memory, CPU and so on your app uses, and the historical patterns and when trouble starts to occur. Knowing that, you can configure recycling to counter those issues. For example, if you know your app has an increasing memory usage pattern* that leads to the app running out of memory after a period of several days, you could configure it to recycle before that would have happened.

    * Obviously, you would also want to resolve this bug if possible, but recycling can be used to increase reliability for the customer

  • February 24, 2014 at 5:59 pm
    Permalink

    If your application runs reliably for longer then the threshold set for app pool recycling, then by all means increase the threshold. There is no downside if your app is stable.

    For us, we have recycling turned off altogether, and instead have a task that loads a test page every minute and runs an iisreset if it fails to load five times in a row.

Leave a Reply

%d bloggers like this: