After some period of time, I'm experiencing problems with starting applications, for example, Viber.
$ /opt/viber/Viber
QSqlDatabasePrivate::removeDatabase: connection 'ConfigureDBConnection' is still in use, all queries will cease to work.
Maximum number of clients reached
(Viber:1279): Gtk-WARNING **: cannot open display: :0
Skype
$ skype
Maximum number of clients reached
Gnote
$ gnote
Maximum number of clients reached
** (gnote:21284): WARNING **: Could not open X display
Maximum number of clients reached
(gnote:21284): Gtk-WARNING **: cannot open display: :0
xrestop
$ xrestop
Maximum number of clients reachedxrestop: Unable to open display!
After some research, I've found that it is related to some limit of unix sockets.
$ lsof -U +c 15 | wc -l
1011
$ lsof -U +c 15 | cut -f1 -d' ' | sort | uniq -c | sort -rn | head -3
382 zenity
256 dbus-daemon
212 chrome
On some sources people are talking about 256 max X client number limit. It looks like this is proved by the following command output:
# lsof -p `pidof X` | tail -n 50
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
Xorg 1672 root 207u unix 0xffff880141189e00 0t0 3759941 @/tmp/.X11-unix/X0
Xorg 1672 root 208u unix 0xffff88001a50a940 0t0 3759944 @/tmp/.X11-unix/X0
Xorg 1672 root 209u unix 0xffff88003a0430c0 0t0 3802123 @/tmp/.X11-unix/X0
Xorg 1672 root 210u unix 0xffff8801117c3c00 0t0 3817272 @/tmp/.X11-unix/X0
Xorg 1672 root 211u unix 0xffff8801225e2580 0t0 4395710 @/tmp/.X11-unix/X0
Xorg 1672 root 212u unix 0xffff88015ed3a580 0t0 4425629 @/tmp/.X11-unix/X0
Xorg 1672 root 213u unix 0xffff88013095f800 0t0 4427059 @/tmp/.X11-unix/X0
Xorg 1672 root 214u unix 0xffff8802e75d9a40 0t0 4427075 @/tmp/.X11-unix/X0
Xorg 1672 root 215u unix 0xffff8801225e12c0 0t0 4608310 @/tmp/.X11-unix/X0
Xorg 1672 root 216u unix 0xffff88031bc8fbc0 0t0 4608314 @/tmp/.X11-unix/X0
Xorg 1672 root 217u unix 0xffff8801309a5dc0 0t0 4608318 @/tmp/.X11-unix/X0
Xorg 1672 root 218u unix 0xffff8801309a2940 0t0 4607747 @/tmp/.X11-unix/X0
Xorg 1672 root 219u unix 0xffff880130958b40 0t0 4786413 @/tmp/.X11-unix/X0
Xorg 1672 root 220u unix 0xffff8800b1382d00 0t0 4787103 @/tmp/.X11-unix/X0
Xorg 1672 root 221u unix 0xffff88011f350000 0t0 5001136 @/tmp/.X11-unix/X0
Xorg 1672 root 222u unix 0xffff88011f352d00 0t0 5144089 @/tmp/.X11-unix/X0
Xorg 1672 root 223u unix 0xffff88011f351a40 0t0 5144417 @/tmp/.X11-unix/X0
Xorg 1672 root 224u unix 0xffff88011f357bc0 0t0 5145648 @/tmp/.X11-unix/X0
Xorg 1672 root 225u unix 0xffff88014108a940 0t0 5145652 @/tmp/.X11-unix/X0
Xorg 1672 root 226u unix 0xffff88001a50c740 0t0 5145655 @/tmp/.X11-unix/X0
Xorg 1672 root 227u unix 0xffff88006c7b6cc0 0t0 5161703 @/tmp/.X11-unix/X0
Xorg 1672 root 228u unix 0xffff8802e75dddc0 0t0 5225428 @/tmp/.X11-unix/X0
Xorg 1672 root 229u unix 0xffff88015ed3cb00 0t0 5228455 @/tmp/.X11-unix/X0
Xorg 1672 root 230u unix 0xffff880111b203c0 0t0 5235401 @/tmp/.X11-unix/X0
Xorg 1672 root 231u unix 0xffff88013089bfc0 0t0 5259828 @/tmp/.X11-unix/X0
Xorg 1672 root 232u unix 0xffff8800b10030c0 0t0 5310616 @/tmp/.X11-unix/X0
Xorg 1672 root 233u unix 0xffff88010d461e00 0t0 5349971 @/tmp/.X11-unix/X0
Xorg 1672 root 234u unix 0xffff88001a50ddc0 0t0 5530781 @/tmp/.X11-unix/X0
Xorg 1672 root 235u unix 0xffff880142e703c0 0t0 5529146 @/tmp/.X11-unix/X0
Xorg 1672 root 236u unix 0xffff880142e73c00 0t0 5654363 @/tmp/.X11-unix/X0
Xorg 1672 root 237u unix 0xffff88025087f800 0t0 5260838 @/tmp/.X11-unix/X0
Xorg 1672 root 238u unix 0xffff880142e712c0 0t0 5814164 @/tmp/.X11-unix/X0
Xorg 1672 root 239u unix 0xffff8802508a21c0 0t0 5917312 @/tmp/.X11-unix/X0
Xorg 1672 root 240u unix 0xffff8800b1387080 0t0 5851281 @/tmp/.X11-unix/X0
Xorg 1672 root 241u unix 0xffff8802e6854380 0t0 5851284 @/tmp/.X11-unix/X0
Xorg 1672 root 242u unix 0xffff88011f3503c0 0t0 5851295 @/tmp/.X11-unix/X0
Xorg 1672 root 243u unix 0xffff8801041d8f00 0t0 5917315 @/tmp/.X11-unix/X0
Xorg 1672 root 244u unix 0xffff8801041d83c0 0t0 5917322 @/tmp/.X11-unix/X0
Xorg 1672 root 245u unix 0xffff88000aeb4ec0 0t0 5917325 @/tmp/.X11-unix/X0
Xorg 1672 root 246u unix 0xffff880111b21e00 0t0 5993474 @/tmp/.X11-unix/X0
Xorg 1672 root 247u unix 0xffff880143546180 0t0 6115119 @/tmp/.X11-unix/X0
Xorg 1672 root 248u unix 0xffff88000aeb30c0 0t0 6120777 @/tmp/.X11-unix/X0
Xorg 1672 root 249u unix 0xffff88013089da00 0t0 6119223 @/tmp/.X11-unix/X0
Xorg 1672 root 250u unix 0xffff8801309a5280 0t0 6121614 @/tmp/.X11-unix/X0
Xorg 1672 root 251u unix 0xffff88000aeb6cc0 0t0 6139354 @/tmp/.X11-unix/X0
Xorg 1672 root 252u unix 0xffff88010d460000 0t0 6635385 @/tmp/.X11-unix/X0
Xorg 1672 root 253u unix 0xffff88013095b840 0t0 6659213 @/tmp/.X11-unix/X0
Xorg 1672 root 254u unix 0xffff88005c96b480 0t0 6661835 @/tmp/.X11-unix/X0
Xorg 1672 root 255u unix 0xffff88011f350f00 0t0 6710815 @/tmp/.X11-unix/X0
Xorg 1672 root 256u REG 0,16 4096 22306 /sys/devices/pci0000:00/0000:00:02.0/drm/card1/card1-LVDS-1/intel_backlight/brightness
I can close some application, for example, Chrome and then Viber can be started.
I'm wondering if this is normal to have 200+ connections for the top three apps? Or just suggest how to solve the problem, please.
Note, I can use my system for months without rebooting (suspend/resume).
Linux Mint 17.3 64-bit Cinnamon