Xlib: Maximum number of clients reached

4 views (last 30 days)
Mike
Mike on 3 Oct 2015
Commented: Aaron on 23 Jun 2023
When we run 100+ simulation (compiled file) we get following error:
Xlib: connection to "10.26.24.222:2.0" refused by server
Xlib: Maximum number of clients reached
Unable to initialize com.mathworks.mwswing.MJStartupForDesktop
Unable to initialize com.mathworks.mwswing.MJStartup
Unable to initialize com.mathworks.toolstrip.plaf.TSLookAndFeel
Xlib: connection to "10.26.24.222:2.0" refused by server
Xlib: Maximum number of clients reached
These simulations are not using any GUI. What can we do to solve this problem? How to disable any X connections?
  2 Comments
Mike
Mike on 8 Oct 2015
Does anybody know anything about this problem?
Aaron
Aaron on 23 Jun 2023
I might know about this one. If you are accessing the job through a terminal emulator in a remote session like a VNC, the Matlab compiled program might be fooled into thinking you need graphics. In the job submission file, or in the terminal, type:
unset DISPLAY
That worked for me.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 8 Oct 2015
Try starting MATLAB with the -nodesktop option. If that is not sufficient, try starting it with -nodisplay option
  2 Comments
Mike
Mike on 8 Oct 2015
This is a compiled executable I'm talking about. Will your guess work with that?
Walter Roberson
Walter Roberson on 8 Oct 2015
Hmmmm, no. Could you try rebuilding it as a Console Application?

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!