Timeout Functionality Explained

Timeout Functionality Explained

To use the TIMEOUT/TIMEOUTALL option you may want to modify the following variable in the lsvendor.c file:

"int ls_minimum_user_timeout = 900; /* Minimum user inactivity timeout (seconds)" This is set for 15 minutes by default, so if you're happy with this setting then you won't have to update your vendor daemon, if you want to increase/decrease this setting, then you'll need to rebuild your vendor daemon and update the existing ones.

By using the TIMEOUT/TIMEOUTALL option you will have to set this to anything higher the ls_minimum_user_timeout setting, if you set this below the 900 value, then it'll be ignored and the ls_minimum_user_timeout value will be used.

Note: By setting a short value could result in licenses being checked in before the customer has finished with it, for example, should the customer walk away from their machine for any reason.

To get the TIMEOUT and TIMEOUTALL options working, you need to first make sure you have your vendor and client application set-up correctly. To illustrate how this works, I'll first explain how to set it up using the C API.

The heartbeat settings for a client application consist of
LM_A_CHECK_INTERVAL (Interval heartbeats exchanges; Minimum 30 seconds, default 120)
LM_A_RETRY_INTERVAL (Interval between retry attempts; Minimum 30 seconds, default 60)
LM_A_RETRY_COUNT (Number of reconnect attempts; Default 5, -1 turns it off)
LM_A_TCP_TIMEOUT (Specifies time to wait after TCP/IP disconnect before license checkin)

In the Options file, TIMEOUT or TIMEOUTALL needs to be between:

ls_minimum_user_timeout (by default 900 sec in lsvendor.c)
and (LM_A_TCP_TIMEOUT value by default is 7200 seconds = 2 hours)

The key thing to remember is the vendor setting needs to be lower than the Options file setting.

For example, if you set the vendor to 4 minutes, the options file to 8 minutes, and the client to 12 minutes, as soon as you check out a license (and disconnect the client from the network), the server will check the license back in after 8 minutes (plus a whatever the interval was when the client disconnected, making the actual time likely ~9 minutes).

Now, the new variable "ls_prefer_feature_timeout_over_tcp" would mean you'd need to rebuild your vendor daemon to enable this. Using this enables the feature timeout preference set in "TIMEOUT/TIMEOUTALL" over tcp timeout (LM_A_TCP_TIMEOUT) set in the client. When this variable is set to 1 in the lsvendor.c file and the TIMEOUT/TIMEOUTALL is set in the OPTIONS file then this takes preference over "LM_A_TCP_TIMEOUT" irrespective of its value.

To use the variable "ls_prefer_feature_timeout_over_tcp" you'll have to rebuild the vendor daemon and client to use it. If you just want to use "LM_A_TCP_TIMEOUT" then you'll only need to build the client and set the manual heartbeat attributes, as shown above.

Was this article helpful? Yes No
No ratings
Version history
Revision #:
2 of 2
Last update:
‎Jul 29, 2021 12:54 AM
Updated by:
 
Contributors