VOV: How to manage vovserver when there are "too many clients in the system"


If you receive the message: "too many clients in the system" when trying to execute Runtime commands, your vovserver has exhausted its file descriptors. Particularly for NC, it is important to check the number of available descriptors before answering yes to the "ok-to-start" prompt of the ncmgr command.

The vovserver reserves the 40 lowest-numbered file descriptors for local connections when other clients cause most available file descriptors to be used.

To run vovsh-based commands under this condition, perform the following steps:

These commands can close replaceable clients like GUIs to free up some file descriptors, or shut down vovserver in an orderly way instead of crashing it using the OS kill() command.

  1. Get the shell on the vovserver host as the vovproject owner.
  2. Change to the parent of the <project>.swd.
  3. Set your shell to connect to the project vovserver
    % ves <project.swd>/setup.tcl
    For example:
    % ves vnc.swd/setup.tcl
  4. Override the VOV_HOST_NAME env-var to use the loopback interface. For example:
    % setenv VOV_HOST_NAME localhost
  5. Run the desired command. For example:
    % vovshow -clients
    % vsi
    The third field of the vovshow -clients command output is the client index, which may be used with vtk_server_config closeclientbyindex to terminate clients from the vovserver. You can use the nickname of the client to identify it. To close an NC GUI, with the nickname is ncgui , you would use:
    % vovsh -x 'vtk_server_config closeclientbyindex 11'
    This assumes that the index of the ncgui client is 11.
  6. If there are numerous clients to close, consider using the closeclient script.