What is the advantage of increasing "maximum worker processes" in IIS?

The only real advantage of increasing the number of worker processes is if you've got some long running process that's blocking the other threads from running - in which case you might want to consider adding another Worker Process.

However, as you've found this basically spools up another instance of w3wp.exe with it's own memory space that doesn't share in-process information between them, so you need to ensure you're set up for session sharing (MachineKey has been set, session is stored in a database or Session Service, etc.). A better option would be looking to see if you can offload the long running process to a separate process altogether.


We use multiple workers on our web services server so that if we reach a peak period, another worker will spawn and handle more requests. This is especially effective with WCF services and is totally automatic. Some of these services are set to spawn up to 8 additional workers with the only limitation being memory. Works great.

Tags:

Iis