Hello, recently I encountered a problem where I can't open any new windows (including steam settings or steam game properties). Running through the terminal, the error responsible is "Maximum number of clients reached" which refers to X.org clients.
I was able to catch the culprit using xrestop when launched it will show "Monitoring XX clients" near the top. Default max clients for mint 22.3 seems to be 256, so once that number of clients is reached no new windows can be opened.
Exiting discord (I use flatpak version) dropped number of clients from 256 to 66, starting it again raised it to 80, suggesting the possible leak.
I ask people reading this to monitor their discord app (flatpak and deb) if the number of X clients rise as you use it, and if it ever gets near 256 for you, thank you.