On Sat, Aug 24, 2013 at 05:42:18PM +0100, Christian Jaeger wrote: [...] > After running my laptop for a bit over 2 months, I've started getting, for > example when running urxvt from another terminal: > > Maximum number of clients reachedurxvt: can't open display :0.0, aborting. > [...] > xlsclients|wc -l > > tops out at 158,
hmmm... That is interesting indeed. Apparently debian is patched[1] to allow 512 clients. But I don't think xlsclients is really a good indicator of actual X resource usage. > > ls /proc/`pidof Xorg`/fd|wc -l > > at 256. This being such a round number seems to strongly suggest that it's > tied to the number of fds. But why so low? xorg.conf does not mention any > limit. I imagine based on this: > > # cat /proc/`pidof Xorg`/limits > Limit Soft Limit Hard Limit Units [...] > Max open files 1024 4096 files that the 256 value is just a coincidence. I've found a variety of references that suggest that perhaps a client is misbehaving and not releasing resources it's not using anymore[2]. What is the output of xwininfo -root -children that should be a better measure of resource usage. On my machine it reports significantly more children than xlsclients reports as the number of clients. Also there is xrestop, a top-like program that shows X clients and, at least on my machine, reports a few more clients than xlsclients. ISTM your best bet is to iterate through all the open clients you can identify, close each one, and perform a test to see how many clients you can subsequently open. One of your running X processes is mis-behaving and holding on to more than it should. Here[3] is an example of the kind of thing that can go wrong... Or you've got a whole lotta windows open ;) A Footnotes: [1] http://www.mail-archive.com/debian-x@lists.debian.org/msg83944.html [2] http://askubuntu.com/questions/4499/how-can-i-diagnose-debug-maximum-number-of-clients-reached-x-errors [3] http://slackblogs.blogspot.com/2011/02/x11-maximum-number-of-clients-reached.html --
signature.asc
Description: Digital signature