Bug 439797

Summary: [CRM 1067838] Customer would like increase max number of X server connections
Product: Red Hat Enterprise Linux 5 Reporter: Alan Matsuoka <alanm>
Component: xorg-x11-serverAssignee: Adam Jackson <ajax>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 5.2CC: cward, mgordon, ofourdan, rlerch, syeghiay, tao, xgl-maint, zcerza
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 511125 (view as bug list) Environment:
Last Closed: 2009-09-02 11:42:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 511913    
Bug Blocks: 391501, 511125    
Attachments:
Description Flags
Proposed patch to make the maximum number of clients user configurable
none
Proposed patch
none
Proposed patch none

Description Alan Matsuoka 2008-03-31 14:14:55 UTC
Description of problem:

Customer running into a limit with the number of X connections with RHEL 5. This
is a limit of 256 clients that is set at compile time. This is easy to verify on
a RHEL 5 system. just open >256 x applications. This is the same issue as IT
#106385.

--- xc/programs/Xserver/include/misc.h.old      2006-11-07 14:26:56.274826984 -0500
+++ xc/programs/Xserver/include/misc.h  2006-11-07 14:27:24.123593328 -0500
@@ -93,5 +93,5 @@
#define MAXSCREENS     16
#endif
-#define MAXCLIENTS     256
+#define MAXCLIENTS     512
#define MAXDITS                1
#define MAXEXTENSIONS  128

Version-Release number of selected component (if applicable):

xorg-x11



Additional info:

This issue was solved for RHEL4 IT 106385 BZ 2302217 and issued as part of an
RHEL 4 errata http://rhn.redhat.com/errata/RHBA-2007-0756.html

Comment 3 RHEL Program Management 2009-03-11 17:39:03 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Olivier Fourdan 2009-04-21 12:53:02 UTC
Created attachment 340512 [details]
Proposed patch to make the maximum number of clients user configurable

This is the same as bug #490951 on el4, ported to xserver-1.1.1 on el5

See comment 4 in bug #490951 for the logic of the patch.

https://bugzilla.redhat.com/show_bug.cgi?id=490951#c4

Comment 7 Olivier Fourdan 2009-04-22 11:33:18 UTC
Created attachment 340719 [details]
Proposed patch

Updated patch for el5, this patch fixes an issue with the Xorg.conf "MaxClients" option and adds a message in the log.

Comment 8 Olivier Fourdan 2009-04-22 12:02:41 UTC
Created attachment 340722 [details]
Proposed patch

Updated patch, typo.

Comment 9 Adam Jackson 2009-05-14 00:30:17 UTC
Applied to -48.59.el5

MODIFIED

Comment 11 Chris Ward 2009-07-03 18:01:50 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 12 Mark Gordon 2009-07-09 21:36:01 UTC
I don't see the "Xlib: Maximum number of clients reached" error up to the defined MaxClients (I'm using 512), but I'm only actually able to start around 256 clients (testing using a bash loop to open numbered zenity windows).  Beyond that, things fail silently.  Under Gnome, I can open 224 zenity windows, and under a failsafe terminal session, I can open 245 zenity windows.  This is with xorg-x11-server-Xorg-1.1.1-48.64.el5.

Comment 14 Olivier Fourdan 2009-07-10 16:11:30 UTC
XFD_SETSIZE needs to be increased to 512 too in Xproto.h which is part of
another package on el5 (xorg-x11-proto-devel-7.1)

With XFD_SETSIZE at 512 it works, I get up to 493 xlogo.

Comment 15 Olivier Fourdan 2009-07-10 17:10:57 UTC
Sorry, I meant increasing XFD_SETSIZE to 512 in *Xpoll.h* from xorg-x11-proto-devel and after rebuild the X server with the new value for XFD_SETSIZE.

Comment 16 Adam Jackson 2009-07-13 19:24:24 UTC
We don't have an errata slot open for rebuilding -proto-devel for 5.4.  Will work around this in the X server for now and fix properly in 5.5.

Comment 17 Adam Jackson 2009-07-13 21:33:44 UTC
Minimally tested fix built locally.  With Xvfb -ac -maxclients 512, I can run 300 xlogos, and still get output from xdpyinfo, indicating that clients above 256 are responsive as you'd expect.

Comment 22 Adam Jackson 2009-07-21 22:18:42 UTC
built xorg-x11-server-1.1.1-48.66.el5

MODIFIED

Comment 24 Mark Gordon 2009-07-28 21:37:57 UTC
This is now working as one would expect.  Server performance can suffer greatly when too many clients are open, even when there's sufficient RAM, but there's no longer an arbitrary limit of 256 clients.

Comment 26 Ryan Lerch 2009-08-06 00:32:09 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Previously, the XFD_SETSIZE value in the Xpoll.h header file was set to
allow only 256 X client connections for a single X server. Consequently, if
this limit was reached, the X Server would silently deny new connections.
With this update, the XFD_SETSIZE has been modified to support a maximum of
512 X client connections. The X server supplied in Red Hat Enterprise Linux
5.4 has been built with this limit increase included.

Comment 29 Ryan Lerch 2009-08-06 01:12:29 UTC
Deleted Release Notes Contents.

Old Contents:
Previously, the XFD_SETSIZE value in the Xpoll.h header file was set to
allow only 256 X client connections for a single X server. Consequently, if
this limit was reached, the X Server would silently deny new connections.
With this update, the XFD_SETSIZE has been modified to support a maximum of
512 X client connections. The X server supplied in Red Hat Enterprise Linux
5.4 has been built with this limit increase included.

Comment 30 errata-xmlrpc 2009-09-02 11:42:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1373.html