Re: Maximum User Handles Per Process Is 10,000 in Windows 2000

From: Francois Piette (francois.piette_at_overbyte.be)
Date: 03/04/04


Date: Thu, 4 Mar 2004 13:20:20 +0100


> Fix your program so that it doesn't overflow the message queue. You
can
> either use PeekMessage to pump messages interleaved with whatever
processing

The problem is _not_ the message queue overflow.
The problem is the limit of 10000 that windows impose on the number of
window handles.

--
francois.piette@overbyte.be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
"Gary Chanson" <gchanson@No.Spam.TheWorld.net> a écrit dans le message de
news:%238TFwfdAEHA.916@TK2MSFTNGP10.phx.gbl...
>
> "Francois Piette" <francois.piette@overbyte.be> wrote in message
> news:40470a96$0$254$4d4efb8e@read.news.be.uu.net...
> > I have a program that is impaired by the limit of 10000 window handles
> > imposed by W2K. This program use hidden windows for message processing
and
> > stop working in high load because of this limit.
> >
> > This limit is known
> (http://support.microsoft.com/default.aspx?kbid=326591)
> > but can be changes with a registry key. Unfortunately this doesn't work
on
> > my Win-2K-Server-SP4 ! I have changed the limit from 10000 to 20000 in
the
> > keys:
> > HKLM\Software\Microsoft\Windows
> > NT\CurrentVersion\Windows\USERProcessHandleQuota
> > and HKLM\Software\Microsoft\Windows
> > NT\CurrentVersion\Windows\GDIProcessHandleQuota but this has no effect,
> even
> > after rebooting the server.
> >
> > What should I do ?
>
>     Fix your program so that it doesn't overflow the message queue.  You
can
> either use PeekMessage to pump messages interleaved with whatever
processing
> you're doing or better, use a separate thread for your processing so that
> you can run a normal GetMessage based message pump.  Don't tie up your
> message pump thread by doing lengthy processing within message handlers.
>
> -- 
>
> -GJC [MS Windows SDK MVP]
> -Software Consultant (Embedded systems and Real Time Controls)
> - http://www.mvps.org/ArcaneIncantations/consulting.htm
> -gchanson@mvps.org
>


Relevant Pages