Is there a way to configure the Application Pool's "Idle timeout" in web.config?
Asked Answered
U

3

15

I know one can set the session timeout. But, if the application itself has received no requests for a given period of time, IIS shuts down the application.

This behavior is configurable in the IIS management console, and I know how to do this. Still, I wonder if it is possible to configure this in web.config.

Untouchable answered 9/3, 2009 at 9:57 Comment(0)
P
5

Not in IIS 6. In IIS 6, Application Pools are controlled by Worker Processes, which map to a Request Queue handled by HTTP.sys. HTTP.sys handles the communication with the WWW Server to determine when to start and stop Worker Processes.

Since IIS 6 was created before .Net, there's no communication hooks between .Net and the low-level http handlers.

ASP.net is implimented as an ISAPI filter, which is loaded by the Worker Process itself. You have a chicken-before-the-egg issue if you are looking at the web.config controlling a worker process. This is primarily why MS did the major re-write of IIS 7 which integrates .Net through the entire request life-cycle, not just the ISAPI filter portion.

Partook answered 9/3, 2009 at 19:51 Comment(0)
S
3

You can edit these settings, but not in web.config. If you have IIS7, the setting is in applicationHost.config, and the key attribute is the shutdownTimeLimit.
You can google for it, to find out how to use appcmd and other tools to set or change it.

Example

Also you can directly modify the shutdownTimeLimit by editing the applicationHost.config file, which is in the \inetsrv\config directory.

The schema for the applicationHost.config file is in the \inetsrv\config\schema\IIS_schema.xml file.
So open it in your favorite schema-aware XML editor and you'll get intellisense, etc.

Siddon answered 9/3, 2009 at 18:53 Comment(0)
M
0

You can do it with setting IdleTimeout. BUT changes to the processModel element take effect only when the worker process is restarted—not immediately after the setting is changed, as with other configuration elements. You can see it here: processModel Element

You also must change machene.config to can edit machine configuration from other archive.

Merriman answered 17/4, 2009 at 7:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.