COM creation timeout for Matlab due to connection to license server

5 visualizzazioni (ultimi 30 giorni)
My tool uses COM object as a protocol to control Matlab. In the document for COM protocol, developer limits the time for COM creation around 2 minutes. If the connection to Matlab server takes longer than 2 minutes (license server is in Germany and user’s machine is in India or Vietnam => slow connection) => COM creation failed => error in COM creation.
However, this only occurs on the r2016b for me. COM creation works pretty well for other versions of Matlab.
If there is any solution to extend the COM creation time limit or to speed up the connection to the license server?

Risposte (1)

akshatsood
akshatsood il 9 Gen 2024
Modificato: akshatsood il 9 Gen 2024
I see that you are experiencing a challenge with extending the COM object creation time limit with MATLAB R2016b. A straightforward solution involves upgrading to MATLAB R2017a or a later version that aligns with your project needs.
Should you prefer or require the continuation of R2016b, there is a potential workaround to increase the COM creation timeout. This involves adjusting an environment variable, MW_LM_SERVICE_TIMEOUT, which is designed to customize the timeout duration for the MathWorks Hosted License Manager (MHLM) web service.
By setting the MW_LM_SERVICE_TIMEOUT environment variable to your desired timeout value in seconds, you can effectively override the default timeout period. Please make sure to apply this change on the system that initiates the call to MHLM for license verification.
Please note: If you are operating within a clustered environment, it is necessary to configure this environment variable on each of the cluster nodes to ensure the new timeout setting is recognized and implemented across the network.
I hope this helps.

Prodotti


Release

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by