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
?
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.
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" ..
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With