From time to time I get this message, I cant start application when this happens.
I've tried those links: Can't start applications due to “Maximum number of clients reached” error and How can I diagnose/debug "maximum number of clients reached" X errors? but I couldn't find a proper solution.
Some info:
when running lsof -U +c 15 | cut -f1 -d' ' | sort | uniq -c | sort -rn | head -15
the result is:
109 dbus-daemon
16 systemd
15 gnome-shell
12 ibus-daemon
11 xdg-desktop-por
11 nautilus
11 gnome-session-b
10 pulseaudio
10 gnome-software
9 x-terminal-emul
8 gsd-media-keys
7 update-notifier
7 gsd-xsettings
7 gsd-power
7 gsd-keyboard
and this is when I have only one terminal open, nautilus file explorer, chrome (7 tabs), and blender.
My main suspect is dbus-daemon
.
My questions:
- How can I diagnose what causes dbus to behave like that?
- Is there a way to increas the limit? I have a quite strong machine and all...
- What to do? should I search in a different direction?
EDIT:
after running uname -s -v -i -o
I get: Linux #52~18.04.1-Ubuntu SMP Thu Sep 10 12:50:22 UTC 2020 x86_64 GNU/Linux
It is not related to the version of your software I think because I am having the same problem on Lubuntu 20.04.
I think I found a direction to 'solve' the issue 'Maximum number of clients reached' on https://unix.stackexchange.com/questions/498652/does-x-window-have-a-maximum-number-limit-on-clients.
In short what I did :
Find the maximum number of maxclients possible by the next command :
max maxclients is 2048 in my case ( has to be a power of 2 so 128, 256 etc. )
The next command needs to be executed as root because of filesystem security :
I installed a tool to monitor X related things :
I also added the next 3 lines at the end of my ~/.bashrc :
So now I can monitor with the commands watchlsof and xrestop and maybe later increase the value in 99-maxclients.conf to 1024 or the highest value 2048
I hope this helps