reachedMaximum number of clients

Alan Coopersmith alan.coopersmith at oracle.com
Thu Oct 6 20:10:17 PDT 2011


On 10/ 5/11 07:52 AM, Bernd Schubert wrote:
> Hello,
>
> I'm getting out of ideas how to get rid of an annoying problem:
>
> Maximum number of clients reachedMaximum number of clients reachedMaximum number
> of clients reachedMaximum number of clients reachedError: cannot open display: :0
>
>
> Somehow I get this message in my xerrors log file each and every day after a few
> hours and I have no idea what causes it. So far I have
>
> - switched from a small xdmcp client to a real desktop system
> - avoided to run application over remote-X (which we are frequently doing here,
> not only on xdmcp systems)
> - switched from gnome to kde
> - monitored X usage with xrestop
> - monitored open file descriptors of X
>
> Nothing of that has helped or revealed anything so far.
>
> If the issue comes up, xrestop does not show much different values than after a
> start of my session. Counting the number of open files with
>
> lsof -p `pidof X` | wc -l
>
> shows rather high number between 750 and 900, but so far not above 1000 (limit
> is 1024). The /proc/$PID/fd shows even much less open FDs, usually between 150
> and 250.
>
> So it would be really nice, if there would be a way to figure out where the
> limit of "Maximum number of clients" comes from.

The message in the X server comes from ErrorConnMax(), which is called when
AllocNewConnection fails, which can happen if:

- the number of connected clients has exceeed MaxClients (defaults to 256)
- malloc fails allocating memory for the new client
- NextAvailableClient is unable to find an available client id for the client
	or client initialization otherwise fails

Unfortunately, the best I can offer is that the most likely explanation is
that there are indeed more clients connected than the maximum allows - perhaps
you have some clients that aren't closing down completely or are leaving
resources marked as retained on exit?

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System




More information about the xorg mailing list