Use Timeouts for Idle License Keys

    Note   You can use timeouts only with concurrent licenses.


If you have a Concurrent license, you can use the FlexNet® licensing timeout option to automatically return idle license keys at your site. With license timeouts, the license manager automatically frees license keys that sit idle for a specified period of time, returning them to the pool of available license keys.

For example, when you start MATLAB® and other products, such as toolboxes, you check out license keys for these products. If you go home without exiting your MATLAB session, these licenses remain checked out and are not available to other users. With timeouts enabled, after your licenses sit idle for a specified period of time, the license manager releases the license keys for all the products you had been using and these keys become available to other users.

Enable License Timeouts

To take advantage of timeouts, you must specify the TIMEOUT option in a FlexNet options file. This options file is a text file that contains license manager options statements, such as INCLUDE, EXCLUDE, and GROUP statements.

To enable timeouts:

  1. Create a FlexNet options file, if one does not already exist, using any text editor. Name the options file MLM.opt and put the file in the matlabroot/etc/$ARCH folder, where matlabroot represents you installation folder and $ARCH represents a platform-specific folder. For example, on a Windows system, you might create the file

    C:\Program Files\MATLAB\R2014b\etc\win64\MLM.opt
  2. Add the TIMEOUT option to the options file, using the following syntax:

    TIMEOUT feature seconds

    For feature, specify MATLAB. You cannot specify separate timeout values for individual MathWorks® products, such as toolboxes.

    For seconds, specify the amount of idle time you want to allow. The minimum value is 4 hours (14,400 seconds). If you specify a timeout value that is smaller, the minimum value is used. For example, to specify a five hour time

    out, enter the following in your options file.


      Note   FlexNet licensing supports the TIMEOUTALL option that you can use to specify the timeout value used for all products. However, MathWorks does not recommend using this option. The TIMEOUTALL option affects all the products listed in the License File which could include products from other vendors, not just MathWorks products. In addition, when you use the TIMEOUTALL option, the license manager log file can become misleading. For example, log file entries include whatever value you specify in the TIMEOUTALL option even if the actual value used is another value, such as the MathWorks minimum time-out value.

  3. Make sure the DAEMON line in your License File specifies the location of your options file. The License File DAEMON line must include the options= syntax. For example, your DAEMON line might look like the following:

    DAEMON MLM "C:\Program Files\MATLAB\R2014b\etc\win64\MLM.exe" \
                options="C:\Program Files\MATLAB\R2014b\etc\win64\mlm.opt"
  4. Stop the license manager and restart it. Whenever you change the License File, or change the time-out value in the options file, you must restart the license manager.

Experiencing a License Timeout

When timeout is enabled, if you open a MATLAB session, and then leave it inactive for more than 4 hours, when you return, you will find MATLAB still open on your desktop. However, you will see the following message displayed in the Command Window:

Your MATLAB session has timed out.  All license keys have been 

The timeout is also recorded in the license manager log file, as follows:

Idle session.  Returning keys for <user>@<machine>

To resume a MATLAB session that has timed out, start using MATLAB again. If a license key is available, MATLAB checks it out automatically. Likewise, as you use the toolboxes and other products that you had checked out, MATLAB obtains license keys for these products as well.

If a license key is not available, MATLAB periodically attempts to check out a license, issuing warning messages. After 10 warnings, if a license key is still not available, MATLAB saves the workspace and exits.

    Note   If you return to a Simulink® session that has timed out, and no licenses are available, you cannot run or modify a currently open model. These menu options are disabled until a Simulink license key becomes available. You can, however, save a model in a Simulink session that has timed out.

Was this topic helpful?