Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent/extend idleTimeout in IIS 7?

In IIS7, the processModel.idleTimeout property can be set in an application pool. A worker process will shut down after this specified period of inactivity.

However, I use Application_Start to run a number of jobs. If there is no visitor to the website the jobs would be disposed and will not run on time.

In IIS 7, the Regular Time Interval (periodicRestart), that specifies when process recycling happens, must be bigger than the idleTimeout.

Is it safe enough if I set larger values for the idleTimeout and periodicRestart?

like image 770
Edwin Tai Avatar asked Oct 08 '10 13:10

Edwin Tai


People also ask

What is IIS idle time-out?

IIS has a idle time-out property that is by default set to 20 minutes. This means that if no request comes for your site for 20 minutes of inactivity, IIS would kill the worker process to free-up resources. This means the memory utilised by loading of classes, session etc.

How do I set idle timeout in web config?

config under processModel section: idleTimeout: Specifies the period of inactivity, in the string format hr<tt>:</tt>min<tt>:</tt>sec, after which ASP.NET automatically ends the worker process. Example: <processModel enable="true|false" timeout="hrs:mins:secs|Infinite" idleTimeout="hrs:mins:secs|Infinite" ..


1 Answers

In order to avoid my application exiting and to be on the safe side, I have configured the idleTimeout to 0 (infinity) and periodicRestart to the default value (1740 minutes).

After a few days working with this configuration, I haven't found problems so far. The application doesn't quit and it is quite safe that after 1740 minutes it will restart.

like image 164
Victor M. Avatar answered Sep 18 '22 14:09

Victor M.