Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hope someone can help me make sense of this. I'm trying to debug some COM+ errors we see in our production environment and a few of them report that the desktop heap is exhausted, so I installed Windows Debugging Tools and DHeapmon for starters after reading the definitive Desktop Heap guide: http://blogs.msdn.com/b/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx

Basically, as I understand it -- Every IIS worker process (w3wp.exe) should be allocated a (non-interactive) desktop heap; default of 512k. We have 30+ sites on our production box, and when I run DHeapmon to report the number of desktops, it not only doesn't report 30+ desktops as I expected (1 for each process, and then the actual windows interactive desktop on the server) -- it reports a single digit # of desktops.

I verified that we are not sharing application pools or desktops, so I should see a desktop for each process, right?

One thing I had a question about was -- if an IIS work process is IDLE, it should get killed -- default is 20 minutes I believe. However, I accessed one of the idle websites, it indeed spawned a new w3wp.exe for that site, then ran DHeapmon again, and it still reported the same number of desktops.

What am I missing? Is there a better way to get the info I'm after?

Any help is appreciated!

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

No, each session space has a single desktop. re-read the section of the link you have titled "Laying the groundwork: Session Space" from the article: "Session space is divided into four areas: session image space, session structure, session view space, and session paged pool ... Session view space contains mapped views for the session, including desktop heap"

To get additional desktop heap(s) you need to run seperate pools with seperate credentials. That being said running out of desktop heap on a server app tells me there is some bug in the code or just bad programming. Desktop heap is for UI elements. Another possibility is that IIS is running as the same user as an exisiting service account that has some bad code in it.

Lastly yes idle w3wp processes will get killed after the timeout but that will not necessarily spawn a new desktop as it depends on the user context creating it.

share|improve this answer
    
"To get additional desktop heap(s) you need to run seperate pools with separate credentials." Thats what I needed :) Okay, so with that said, even if the issue is ultimately with the application code -- could I tune things from the server end by running multiple pools with separate credentials? That way, instead of sharing ONE desktop heap with ALL sites -- each site/app pool will have its own heap to use up. Make sense? –  tresstylez Mar 29 '11 at 7:17
    
yes you could do that –  Jim B Mar 29 '11 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.