1

Can I configure the number of worker process, that I need an application pool should use?

Vaibhav Jain
  • 115
  • 1
  • 6

2 Answers2

1

Yes. The maximum number of worker processes serving an application pool is defined in the application pool processModel section. The attribute is called maxProcesses.

You can set this attribute with the IIS Manager:

  • Right-click the application pool you want to configure
  • Select Advanced Settings
  • Increase the Maximum Worker Processes count
  • Mathias R. Jessen
    • 24,907
    • 4
    • 62
    • 95
    • Thanks Mathias, Can I also configure the resources a worker process should be allowed to use. – Vaibhav Jain Feb 07 '12 at 11:22
    • The process owner is always the Application Pool's Identity, eg. an ApplicationPoolIdentity or NETWORK SERVICE. Whatever resources this user/security principal has access too, the process has – Mathias R. Jessen Feb 07 '12 at 16:50
    1

    Yes, it's called a "Web Garden" in IIS parlance. However you should be aware that if you're using "in process" session management (Classic ASP or ASP.NET) then session state will not be shared between these processes.

    If you use Session in any way shape or form you may need to re-architect your application to use an out of process session store or change your configuration.

    With ASP.NET you can configure Session state management to use a number of different Session State mechanisms:

    sessionState Element (ASP.NET Settings Schema)

    You can even provide your own custom provider in addition to the built in session stores.

    With Classic ASP you're kinda stuck with in-process session or you'll need to knock up your own.

    CGI environments typically don't need multiple worker processes because the requests are handed off to the requisite CGI exe. Also CGI based scripting languages such as PHP and Perl tend to store their Session data out of process by default due to the nature of CGI.

    Kev
    • 7,777
    • 17
    • 78
    • 108
    • When you're warning about sessions here does that only apply to ASP? What about PHP sessions? Are those also affected by increasing the Maximum Worker Processes? – Vincent Sep 16 '21 at 18:45
    • 1
      @Vincent PHP has its own session management mechanism and is completely independent of ASP/ASP.NET's managers. – Kev Sep 16 '21 at 22:28