Using webwrite with MPS
显示 更早的评论
I´am using the "webwrite" function for making requests to a Matlab Production Server, the problem is that when the server takes too long to answer(and finally does answer) the function seems not to get the response and keep bloking until timeout, how can i solve the problem??? Thanks in advance.
2 个评论
Kojiro Saito
2019-8-31
Are you using actual Production Server instance, or on MATLAB (using Test Client mode)?
Fidel Ernesto Díaz Andino
2019-9-2
回答(1 个)
Kojiro Saito
2019-9-3
0 个投票
As this document is an example of calling MPS test client from MATLAB using matlab.net.http, but the description "Start a separate session of the MATLAB desktop. This is because you cannot send a POST request from the same MATLAB session that is running the testing interface." is also true to webwrite.
If you're launching MPS test client mode, you need to launch another MATLAB process to call webwrite. You can find MPS test client will accept incoming requsts as soon as webwrite is called from another MATLAB process.
4 个评论
Fidel Ernesto Díaz Andino
2019-9-3
编辑:Fidel Ernesto Díaz Andino
2019-9-3
Kojiro Saito
2019-9-4
As the document of webwrite says, maximum Timeout is 2147.483647 seconds (about 35 minutes), so your server takes more than that, webwrite cannot wait the connection.
So, there are two options.
- Try matlab.net.http.HTTPOptions and call MPS test client from matlab.net.http interface.
- Try MATLAB Production Server's asynchronous request on MPS and call it using webwrite. Currently Test Client does not support async request, so you need to call MPS server instead of test client mode.
Fidel Ernesto Díaz Andino
2019-9-4
编辑:Fidel Ernesto Díaz Andino
2019-9-4
Fidel Ernesto Díaz Andino
2019-9-5
编辑:Fidel Ernesto Díaz Andino
2019-9-5
类别
在 帮助中心 和 File Exchange 中查找有关 Installation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!