Showing results for 
Show  only  | Search instead for 
Did you mean: 

LM_SERVER_HIGHEST_FD - What is this and Why is it needed?

LM_SERVER_HIGHEST_FD - What is this and Why is it needed?

LM_SERVER_HIGHEST_FD is an environment variable.

Why was it needed:

In previous version of toolkits, in the event that lmgrd encountered a connection with a file descriptor number greater than the maximum that can be accommodated in an fd_set buffer, an lmgrd core dump previously occurred.

Who needs to set it?

The LM_SERVER_HIGHEST_FD environment variable can be set by the license administrator (on the server) to limit the maximum file descriptor number that can be assigned to a lmgrd connection.

Why/What is "LM_SERVER_HIGHEST_FD" environment variable:

LM_SERVER_HIGHEST_FD is a throttling mechanism to prevent the server from becoming overloaded by an excess of simultaneous incoming requests. Once the LM_SERVER_HIGHEST_FD limit is reached requests are discarded until the overload situation has abated. In this way the server can continue operating upon those requests which have been accepted and hence there is no need to perform a restart.

LM_SERVER_HIGHEST_FD is lmgrd-only, specifically related to connections to lmgrd, before lmgrd hands off to VD.

Default values and Max:

From, LM_SERVER_HIGHEST_FD defaults to the maximum supported file descriptor number - 1024 on Linux, 4096 on Windows. The maximum acceptable value for LM_SERVER_HIGHEST_FD is system dependent (but FD_SETSIZE typically evaluates to 1024).

If the value defined by LM_SERVER_HIGHEST_FD is larger than the maximum then the system maximum value will be used instead. Technically, the upper limit is defined by the preprocessor macro NHANDLE defined in corecrt_internal_lowio.h in the Windows SDK sources for the UCRT

With Windows Sockets 2 all socket "file descriptors" are actually Windows handles and last two bits of the Windows handle are always 00. So the fd's returned by accept are in multiples of 4 on Windows. Hence for simultaneous 1000 client connections, 4096 (> 4000) is the defined limit.

Not to Miss:

when a client connects using a file descriptor > LM_SERVER_HIGHEST_FD, it will receive an error such as -16 (LM_CANTREAD) or -95 (LM_NOT_THIS_HOST) and the message “Warning: Maximum connections to the server has reached. Please disconnect some clients from the server “will be written to the server log (FNP-11133).

In some cases, the lmgrd process may be overwhelmed by client connections before the file descriptor allocation is exceeded: symptoms of this occurring are when clients receive -15 (LM_CANTCONNECT) errors and an accumulation of sockets on the server in ESTABLISHED or CLOSE_WAIT states while client volume is high. This is an indication that the server hardware resources are not handling the client load: in such cases one option to reduce load on the server is to decrease the LM_SERVER_HIGHEST_FD value (FNP-13992).

Was this article helpful? Yes No
100% helpful (1/1)

I have multiple lmgrds running in a triad setup. I'm getting this error "(lmgrd) Warning: Maximum connections to the server has reached. Please disconnect some clients from the server" even after setting the LM_SERVER_HIGHEST_FD env variable. Any suggestions please?

Hi @girinathbr  ,


As mentioned in the above article this could be happening due to the client connecting with file descriptor > LM_SERVER_HIGHEST_FD . Please reduce the load on the server and see if you are still getting the error . Also reduce the value of LM_SERVER_HIGHEST_FD .

Version history
Last update:
‎Apr 27, 2020 02:46 PM
Updated by: