Scheduled task and recycle app pool

Discussion in 'Windows / IIS' started by mtbgwilly, Jul 10, 2009.

  1. Hi - Ive been reading various posts on this subject and just want to understand how I can stop the recycle app pool from running every 20 mins (when site is idle). Can anyone confirm, in Scheduled Task Manager is it just a case of running a scheduled task to hit the route of my website e.g, www.mywebsite.com say every 15 mins, or do I need create a separate page with a page_load event to say run a response.redirect to my home page? And is there a way to monitor when the application pool is recycling? i.e. to test this works or not? many thanks mtbgwilly

    PS - Am I right in thinking that another benefit to doing this would be that the .net framework would not need launching when a user comes on the site when it has been idle for over 20 mins. I used to have a virtual private server and if I went on the site when it has been idle for over 30 mins I had to wait for the .net framework to launch first. Does DASP work differently because this is a shared env?
     
  2. You pretty much nailed it. You just need to hit any page really. Most people create a page for themselves to hit just to not mess with the stats etc.

    In regards to knowing if it worked etc, you could write a small app and just see if it maintains session state. If it does - you didnt recycle - if it doesnt - your app recycled.

    In all honesty though its not worth the effort or the use of your resources. If your application takes a long time to compile when spooled up, spend your energy making your application more efficient.

    Upload a precompiled version and spend your time doing something else.

    Just my personal opinion....

    When you account for slow internet connections, boggy user computers, and other factors, your users arent really going to know the difference. Spend your time doing something thats really going to improve your site, traffic, business, whatever. :)
     
  3. Never thought of using Scheduled Task that way but I guess you can make it to generate an http call to your own site. Bear in mind that there are also other conditions implemented on the servers that will cause the application pool to be recycled by our system other then no http calls for 20 minutes. As an example high CPU and memory usage.
     
  4. thanks gents, ill just go for the scheduled task initially, and do some testing by logging for an hour in an idle state and then trying to do something on the website and see of the session remained. cheers
     

Share This Page