Multiple Instances of w3wp.exe
Asked Answered
K

1

13

I don't understand why there are two ASP.NET w3wp processes in Task Manager when I only have one website and one application pool. Why are there two processes running? I have Googled this and looked on MSDN but cannot find an answer.

I am trying to debug a memory leak in an application. I understand the concept of threading and multiple threads living in a process, but I do not understand why there are multiple processes.

I am specifically asking what scenarios can cause more than one process to run.

Krueger answered 2/5, 2012 at 21:24 Comment(1)
An AppPool can have more than one worker process. Under advanced settings of the AppPool, what is "maximum number of worker processes" set to? (That's for IIS 7, there is an equivalent for IIS 6 though)Mucoviscidosis
V
9

Look at the Advanced Settings of your application pool for this section, and make sure the indicated value is set to 1:

IIS Maximum Worker Processes

Virago answered 2/5, 2012 at 21:34 Comment(4)
,thanks. This is set to two. Can you explain a scenario where two worker processes are needed before I mark the question as answered. I understand the concept of multi threading in a process but not multi process.Krueger
Set this value to 2 or more is called web gardening. You should not enable that unless you really understand it, weblogs.asp.net/owscott/archive/2011/06/13/… and microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/…Vally
@LexLi Sigh. Both of those links are stale now. :(Virago
There are still tons of similar posts, like weblogs.asp.net/owscott/…Vally

© 2022 - 2024 — McMap. All rights reserved.