Windows XP flakiness - solved

About 8 months ago, I got a snazzy new development machine at work. From the get-go, I had a peculiar problem – when I opened a bunch of Internet Explorer windows, my machine started going wonky. Actually, the problem wasn’t caused just by IE, but it seemed like IE triggered it more readily. The issue manifested itself as a progression of increasingly worsening UI problems. The first sign of trouble is that the IE toolbars would rearrange themselves. Specifically, the Links toolbar would move from the bottom of the toolbar stack (where I like it) back to the default location (collapsed, to the right of the address bar). If I kept opening windows, the problem would progress to where new IE windows would display without a menu bar, or would sometimes hang and would need to be killed. If I (foolishly) kept opening windows, things really went haywire. Windows became incapable of popping up any new windows. Context menus wouldn’t display, the Start Menu wouldn’t pop up, grouped start menu items couldn’t be selected, etc. Closing open windows would usually restore the system to some semblance of usability, but I usually ended up rebooting at some point, if only for my peace of mind. Needless to say, this was very frustrating.

Maybe this would all be understandable if I were trying to open 200 IE windows, but I would see it trying to open as few as 10, depending on how many other apps I was running at the time. On a machine with 1GB of memory, this is a pretty absurd limitation. I suspected some sort of resource leak – perhaps some app was exhausting GDI resources. Now, IE does chew up a lot of GDI resources, but according to Task Manager it wasn’t completely out of control. I thought maybe the video driver was the problem, but upgrading to newer versions didn’t help. I even burned down and rebuilt the machine, but still had the problem.

Finally, during my umpteenth round of Googling, I ran across a thread that described a problem very similar to my own. One of the responses in the thread mentions a registry setting that increases the size of the desktop heap. According to a somewhat dated but still relevant MS KB article, “this static value is used to prevent ill- behaved applications from consuming too many resources”. Well, apparently it IE meets the “ill-behaved” criteria, because it seemed to cause Windows to bump into this limit, and Windows wasn’t handling it very gracefully. Anyway, to make a long story longer, when I bumped up the desktop heap size (from its default of 3MB up to 8MB), bingo, all of the problems magically disappeared. Whew, what a relief.

To make this change, navigate regedit to HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\SubSystems. The “Windows” value contains a big honkin’ string, and one part of it is “SharedSection=xxxx,yyyy,zzzz”. The second number (yyyy) is the one that you want to increase. Standard registry editing disclaimers apply, YMMV.

49 Comments

  • Thanks for this, it solved a problem I have been trying to fix for a while.

  • I also have been having this problem for YEARS. It happens regardless of which version of Windows you're running (98, 2k, XP), and figured it was related to some max limit on the number of allowable window handles or GDI resources or something. What gets me is how few people report having this problem - are we the only ones who typically have more than 10 IE browser windows open? Also frustrating is that killing the IE process consuming the most GDI inevitably winds up killing all your other open IE windows, and also the fact that process does not seemed to be tied to any one particular window (closing any and all browsers except one will still leave the ("master"?) memory-hogging IE process running)! I was researching alternative browsers when I saw your post; I will try this fix.

  • I've started having the exact same problem when running mIRC and several copies of IE. I get very similar problems...the right mouse button doesn't seem to work, context menus won't open, pushing ctrl-shift-esc won't open task manager, even the run dialogue box won't open. mIRC starts giving saying "error creating window" whenever I try to do anything. I'm going to try your little fix here, and hopefully it will help.



    Thank you!

  • Hey thanks. I'll check this out.
    Interesting to note - I just started having this problem slightly after install ie7 rc1.

  • hmm
    the register key isnt at windows server 2003
    how i fix there?

  • I sure hope this has been fixed in Vista. Funny how Windows will report plenty of memory available yet everything comes crashing down. I have been searching for "Windows out of resources" etc but never found that answer that way. I had previously tried turning down all of my settings (skins, animations etc), increase ram etc. Visual Studio with a very large project is what continually caused this heartache for me.

  • been having this issue for years with win2kpro and now winXP pro. hopefully this will fix it, going to reboot now, thanks! spoke to people on IRC in #windowsXP and was told i was hitting GDI limit which cannot be raised.

  • I can get to HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\SubSystems

    what value do I enter for 8MB? just 8000?

    thanks,

    Sean

  • Thanks for such a remedy!
    I'd note that in Windows Server 2003 R2 (x64 SP2) the yyyy value is about 20000 by default

  • AWESOME THANKS, I've been looking for this fix for years! ever since windows98 and windows 2000 and windows xp!

  • Almost die if no have this solution to solve.

    Great,Thank you.

  • BIG thanks 4 that solution!
    Amazing how this problem has survived through all these years!

  • I had this problem too.

  • Thanks very much!
    It really solved my problem.

  • I am so happy! First aggravation-free workday in weeks! Thank you so much.

  • Thanks^1000. you helped me alot :X

  • Thanks SO much for posting this. I've been frustrated by this problem with Photoshop and other programs open at the same time for years.

  • As others have said, THANK YOU ** 2!
    This has plagued me for years and I just now tried again to find a solution and finally stumbled across this blog entry. A real lifesaver.


  • Thank you so much !!! Since 6 month I deal with this problem

  • This has really helped out with visual studio development. It would be nearly impossible to work with the vast amounts of ram machines have now without this fix.

  • HOLY ****
    i've been tearing my hair out on this one
    thankyou SOOO much i've always had to restart my computer to fix the problem and it would just become a huge nuissance

  • Wow I am amazed that this problem has such a simple solution. I was just about to convert to Firefox!! And it's interesting to note that the problem has actually gotten WORSE over the years, looking at comments, because people's machines have grown more powerful, and their demands for opening windows has grown too, yet XP was stuck at the 3MB limit throughout. Thanks a lot!

  • I started having this problem a couple of months ago, ever since I got in to the habbit of leaving my PC running each night instead of usually shutting it down. It would get worse each day, letting me have progressively fewer applications open at once over time. After a reboot all was well again for a while. I noticed that Process Explorer showed no programs were using up an extraordinary amount of memory, or had a particularly large number of GDI objects, or handles. There was always loads of memory free. I have 2GB total anyway.
    Recently I found other people that were experiencing the same symptoms. I'm going to try increasing the number mentioned here and see if my theory about something leaking in the desktop heap is correct.

  • Thank you so very much for this fix! I have been having this problem for at least 2 years due ot the number of windows i have open (5 monitors, mirc, graphics apps, etc etc etc) and never managed ot find a solution.

    You are a gent and a scholar!

    ~Shepy

  • The tip about sharedsection is most important and should always be done first. If there are still problems you should look to increase HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\GDIProcessHandleQuota to 16384 and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota to 18000

  • Great, thanks very much indeed :)

  • Great!
    For me, the app that caused the most problem was Photoshop CS 3. As soon as I opened it, I could only have a few Visual Studio and IE-windows running. Seems like Photoshop gobbles up an enourmous amount of window-resources, leaving only a small portion left to the other applications.

  • I have done this with 4 machines now and it works great. Thank you for solving this problem.

  • Ah man! my propblem is so bad, I can't even open the Registry editor. :-) LOL.

    Dude thanks a million! I too have been looking for YEARS! I'm trying this setting on Vista.

    Thanks SOOO much!

  • Wow, i've had this problem since i upgraded my RAM from 1GB to 2GB and always wondered why it seemed like i was only able to do less with 2GB than i was with 1GB.
    This has completely fixed my problem and not only can open loads of stuff now, everythin goes a lot faster too!

    Thanks a million for figuring this one out and sharing it! :)

  • Thanks for the tip. I will change it to 8192 (8MB) and tell you the results.

    Greetings.

  • Awesome fix, I have dealing with this issue for a while. I now have opened more windows then I have on XP before.

  • This indeed worked for me, too. Thanks a lot!

  • Published in 2004 helping in 2009. My heap memory kept running out every time I tried to delete a large folder and had to reboot my machine every single time. Awesome post, saved me from going insane.

  • Thanks a ton. Wonderful advice. Life changing (time spent of computer ). God bless you

  • Absolutely brilliant - I've been trying for two years to resolve this problem and for what it's worth this is on Vista too!

    I've been running a ton of eSignal charting software, 8 DDE linked Excel spreadsheets and two trading platforms and then as soon as I open a couple of IE's, the grind-down begins until I eventually have to reboot.

    Not any more - Many thanks!

  • ah. nice. shame i got so frustrated with it so switched to Ubuntu Linux as my primary OS several years ago!

    now i can run as many Windows virtual machines as i like, not that i need to use Windows much any more :-)

  • I was looking for this fix since more than a year. Having 3 Gb of mem windows was not allowing me to open new IE windows.
    My TOAD (Tool for Oracle) showed me empty columns. Task manager was not showing all tabs. This workaround is great. Why the heck still in 2009 they don't fix this issue?

  • Sometimes, Treasury rather than Central Bank paper has been the fiat money, especially before the development of a Central Banking sys- tem. ,

  • Hi,
    Imagine we still face this problem in 2009 with WinXP. I have been using 6 completely different machines for the past years believing it might be the hardware problem.
    I blamed Firefox, Outlook, Lotus Notes, Skype, Communicator, Word, Notepad++, Carbide, Cygwin, Java, Antivirus stuff and firewall soft for that.
    Then multimonitor setups and high resolution as the problem is more likely to occur with higher resolution.

    And then I started to blame XP itself and found your post.

    Thanks a lot once again.

    Regards,
    Maciej

  • Worked for me as well. However, it doesn't work if you have the "/3GB" switch in your boot.ini as I did. Worked great after I removed the param from boot.ini and rebooted. Be sure to make that change in case you were running with the "/3GB" option.

  • Yet another user whose otherwise clean computer would go flaky with not too many IE7 tabs or Windows...

    I kind of suspect video drivers may be involved here since I haven't seen this behavior on other systems that I use in the same way, and because it seemed to go from bad to much worse when I added a second monitor.

  • A big thank you from me too! Having exhausted GDI resources and whatnot now and then since Windows 3.1, it is easy to appreciate the fix published here.

  • Excellent, for this issue, i was restricted to open many IE sessions, and keep closing important session, or making it into favourites,

  • Wow, so many people get machines with 4 and 8 gb of ram now yet windows still acts like it's out of memory! Thanks for the fix. I've used it on several machines!

  • как всегда на высоте

  • может у кого нить есть ещё информация по этому поводу??

  • I've had this problem for years. But finally had enough. I've searched before for solutions, but this is the first time I've found the answer. Thanks!

  • Having the same problem in XP Pro, going to give this a shot. Why doesn't this get fixed by Microsoft???

Comments have been disabled for this content.