如何在 IIS 7 中防止/延长 idleTimeout? [英] How to prevent/extend idleTimeout in IIS 7?
问题描述
在 IIS7 中,可以在应用程序池中设置 processModel.idleTimeout
属性.工作进程将在这段指定的不活动时间后关闭.
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.
但是,我使用 Application_Start
来运行许多作业.如果网站没有访问者,则作业将被处理并且不会按时运行.
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.
在 IIS 7 中,指定何时发生进程回收的常规时间间隔(periodicRestart
)必须大于 idleTimeout
.
In IIS 7, the Regular Time Interval (periodicRestart
), that specifies when process recycling happens, must be bigger than the idleTimeout
.
如果我为 idleTimeout
和 periodicRestart
设置更大的值是否足够安全?
Is it safe enough if I set larger values for the idleTimeout
and periodicRestart
?
推荐答案
为了避免我的应用程序退出并安全起见,我将 idleTimeout 配置为 0(无穷大)并将periodicRestart 配置为默认值(1740分钟).
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).
使用此配置几天后,我还没有发现问题.应用程序不会退出,并且在 1740 分钟后它会重新启动是非常安全的.
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.
这篇关于如何在 IIS 7 中防止/延长 idleTimeout?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!