The GRACE directive enables leasing of licenses to computers that are disconnected from the network unexpectedly. The parameter associated with GRACE defines the number of grace hours a license may be used before a network connection to the license server is required again. Valid values range from 1 to 168 hours (7 days).

This directive can be used only with network licenses; accordingly, theĀ COUNT directive must be set if GRACE is set.

Usage and recommendations

Grace licenses allow users to continue working with an application when the license server goes down. In emergency situations, when no one is available to restart the license server, a time-limited grace license lets the user continue to run the feature. Note that the grace license is available only for the currently logged-in user of the client machine.

Grace licenses work very similarly to license borrowing, described in BORROW. A temporary license is written at the client side upon each successful license checkout from a license server. This license is written in an inactivated state, so it does not have a fixed expiration date set.

If the server becomes unavailable, heartbeats will fail and eventually let you cease the execution of the application, as described in Heartbeats. Upon next checkout, the local grace license is activated in place of the network license for the permitted number of hours. If the license server comes up before the grace license expires, future checkout requests will acquire a network license as usual, but will not reset the expire time of the grace license.

To prevent fraud and over-licensing, LM-X does not allow the user to obtain a new grace license for 7 days after the expiration of the previously activated grace license. If the user needs a local license in the meantime, using borrow is suggested.

You should be cautious about over-licensing, because the server does not remove the grace license from the pool of available licenses in the same manner as for borrow. The grace licenses are counted in addition to the server licenses. For example, if a server has five available licenses of a feature, and two licenses are borrowed, the server would have only three licenses available until the two borrowed licenses are returned. However, if two grace licenses are being used, the server will still have those two licenses available for checkout until the grace period for those licenses has expired.

Grace licensing is enabled by default. As with license borrowing, you may wish to disable grace licensing to increase checkout speed (see Optimizing license checkout speed) or to increase security. Although fairly secure, grace licensing is by nature less secure than other mechanisms in LM-X, and there is a trade-off between convenience and the strength of your licensing solution.

To use grace licenses, you should set the permitted lease time length at license creation, as described in FEATURE settings.

Licensed applications must then enable grace licenses by calling LMX_SetOption(). See LMX_OPT_ALLOW_GRACE in LMX_SetOption.