IIS 7 – worker processes more than one

application-poolsiisiis-7worker-process

if i set worker process as 1, my application pool hangs.
if i set it at least 6, everything works fine.

but every article i read says "don't set it more than 1"

so, in this practice, am i wrong? or who is wrong?

of course i would like to use less memory, cpu.
and another reason i hate about more worker process is sessions.
it is really annoying me.

the site that runs under the app pool has more than 20.000 online visitors
i tried to debug dump files but found nothing interesting

please give me some advice.
thank you.

Best Answer

Chances are, the low-N number is hanging due to a race condition in your code somewhere.

With MaxProcesses=6, you're reducing the level of in-process concurrency, by sending fewer requests to more worker processes.

To debug the original cause:

  • Configure for 1 worker process
  • Wait for a hang - you might want to enable OrphanWorkerProcess for the App Pool in order to leave the hung w3wp in memory after it gets recycled
    • it presumably does get recycled when it hangs, right? Fails a ping, marked unresponsive, events in the Application and System event logs?
  • Grab a memory dump of the process while it's in the hung state
  • Feed that dump into DebugDiag 1.2 and see what it suggests

How did you get the memory dump? (as a rule, you must use a debugger of the same bitness as the worker process to get useful information from it).