26

In IIS Manager, an application pool has checkbox for "Start application pool immediately" in the basic setting dialog, and an advanced setting called "Start Mode" which can be set to "OnDemand" or "AlwaysRunning".

What is the difference between these settings?

Ergwun
  • 361
  • 1
  • 3
  • 6

4 Answers4

14

Had the same question as the original poster but could not find a concise answer, below is the analysis from my research.


Application Pool != Worker Process (w3wp.exe)

  • Typically we see a single w3wp.exe instance running for each application pool but technically we can configure a web garden with multiple w3wp.exe instances running.
    Web gardens... are they good or bad or what?
  • A worker process executes in the context of a single application pool.


Start application pool immediately = Automatic or manual start
Basic Settings...

  • Enabled
    IIS will automatically start the application pool.
  • Disabled
    Someone needs to manually start the application pool.


Start Mode = Worker process start mode: immediately or on demand
Advance Settings...

  • AlwaysRunning
    If the application pool is running immediately start up the w3wp.exe process.
  • OnDemand
    If the application pool is running start the w3wp.exe process when there is an inbound application request.

Additional Notes

  • IISRESET /stop
    Stop IIS, application pool(s) and worker process(es) (w3wp.exe instances).
  • IISRESET /start
    Start IIS and the above configuration settings will determine when the application pool(s) and worker process(es) (w3wp.exe) start up.

  • IIS Manager Stop Web Server GUI action
    Stop the web server from handling inbound requests but will not stop the application pool(s) or w3wp.exe process(es).

  • IIS Manager Start Web Server GUI action
    Start the web server to handle inbound requests but will not start the application pool(s) or w3wp.exe process(es).
    Menu action to start/stop a Web Server

  • IIS Manager Stop Application Pool GUI action
    Stop the w3wp.exe process.

  • IIS Manager Start Application Pool GUI action
    AlwaysRunning vs. OnDemand will determined when the w3wp.exe process starts up.
    Menu action to start/stop an Application Pool
Jeffrey Hyson
  • 171
  • 1
  • 6
7

It looks like "Start application pool immediately" controls whether the application pool is "Started" when the World Wide Web Publishing service is started. But a "started" application pool is not necessarily running (meaning there may not be a w3wp process).

If an app pool is not "started" then you will get a 503 when you hit a site that uses that app pool.

If an app pool is "started" then a w3wp process will service your request. "Always Running" means that when the application pool is started a w3wp process starts. OnDemand means the w3wp process spins up when you first hit a website that is associated with the application (there is a delay while the w3wp starts).

mhenry1384
  • 535
  • 6
  • 15
5

Bit late to respond but I will add my findings as I looked around to find asnwer to this same question.

"OnDemand": IIS will launch worker process when first request for Web application is received. "AlwaysRunning": IIS Launches the worker process for the application pool as soon as IIS is started OR when application pool is created.

jforjimmy
  • 51
  • 1
  • 4
1

Per IIS 8 What’s new – Application pool settings:

Start Mode

A few web applications take a significant amount of time to start up. IIS by default only launches a worker process when the first request for the web application is received. So for the web applications that require a longer time to initialize, users might see slow responses.

For such applications it is a good idea to launch the worker process as soon as IIS is started. The application pools have a startMode setting which when set to AlwaysRunning launches the worker process for the application pool as soon as IIS is started.

IIS 8 provides you this setting in the Application Pool Settings UI.

Dave Black
  • 131
  • 3