COM creation timeout for Matlab due to connection to license server

3 次查看(过去 30 天)
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?

回答(1 个)

akshatsood
akshatsood 2024-1-9
编辑:akshatsood 2024-1-9
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.

类别

Help CenterFile Exchange 中查找有关 Manage Products 的更多信息

产品


版本

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by