Xlib: maximum number of clients reached
Geoff Kingsmill
gkingsmill at yahoo.com
Mon Nov 26 23:47:23 PST 2007
Thanks for all the responses. I was able to increase the number of
connections to 512 by making the following changes.
<source directory>/include/misc.h
#define MAXCLIENTS 512
/usr/share/X11/Xpoll.h
#define XFD_SETSIZE 512
#define XFD_ANYSET(p) \
((howmany(FD_SETSIZE, NFDBITS) > 0 && (__XFDS_BITS(p, 0))) || \
(howmany(FD_SETSIZE, NFDBITS) > 1 && (__XFDS_BITS(p, 1))) || \
(howmany(FD_SETSIZE, NFDBITS) > 2 && (__XFDS_BITS(p, 2))) || \
(howmany(FD_SETSIZE, NFDBITS) > 3 && (__XFDS_BITS(p, 3))) || \
(howmany(FD_SETSIZE, NFDBITS) > 4 && (__XFDS_BITS(p, 4))) || \
(howmany(FD_SETSIZE, NFDBITS) > 5 && (__XFDS_BITS(p, 5))) || \
(howmany(FD_SETSIZE, NFDBITS) > 6 && (__XFDS_BITS(p, 6))) || \
(howmany(FD_SETSIZE, NFDBITS) > 7 && (__XFDS_BITS(p, 7))) || \
(howmany(FD_SETSIZE, NFDBITS) > 8 && (__XFDS_BITS(p, 8))) || \
(howmany(FD_SETSIZE, NFDBITS) > 9 && (__XFDS_BITS(p, 9))) || \
(howmany(FD_SETSIZE, NFDBITS) > 10 && (__XFDS_BITS(p, 10))) || \
(howmany(FD_SETSIZE, NFDBITS) > 11 && (__XFDS_BITS(p, 11))) || \
(howmany(FD_SETSIZE, NFDBITS) > 12 && (__XFDS_BITS(p, 12))) || \
(howmany(FD_SETSIZE, NFDBITS) > 13 && (__XFDS_BITS(p, 13))) || \
(howmany(FD_SETSIZE, NFDBITS) > 14 && (__XFDS_BITS(p, 14))) || \
(howmany(FD_SETSIZE, NFDBITS) > 15 && (__XFDS_BITS(p, 15))))
If I just increased MAXCLIENTS from 256 to 512 then I got another 40
connections (originally 230, now 293) but then got the error for each new
attempted connection:-
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
after 0 requests (0 known processed) with 0 events remaining.
After setting XFD_SETSIZE to 512 and updating XFD_ANYSET I was able to get
489 connections. I am assuming that kde is using the additional 30 odd
connections. An "lsof /tmp/.X11-unix/X0 | wc -l" now returns 503.
So far everything looks good. Now what would be really nice if this could be
rolled up into the master distribution and be configurable.
Thanks,
Geoff..
-----Original Message-----
From: Daniel Stone [mailto:daniel at fooishbar.org]
Sent: Monday, 26 November 2007 7:14 PM
To: Geoff Kingsmill
Cc: xorg at lists.freedesktop.org
Subject: Re: Xlib: maximum number of clients reached
On Sun, Nov 25, 2007 at 06:58:06PM -0800, Geoff Kingsmill wrote:
> I have a number of eight headed workstations that each need in the order
of 500 clients (X-Displays).
> After bringing up 250 odd clients I get the following error:-
> Xlib: connection to ":0.0" refused by server
> Xlib: Maximum number of clients reached. <--
>
> In Solaris the number of clients can be increased by passing the
"-clients 1024" to the X-Server startup.
> I am running RHEL V5.1 (Xorg V7.1.1). Is there a way to increase the
number of clients that can be used with the Xorg X-Server?
Hi,
You have to rebuild, changing the MAXCLIENTS definition.
Cheers,
Daniel
More information about the xorg
mailing list