set connection timeout in java for MPS client
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
Based on Java documentation in MPS guide, I configured a 5 minute connection timeout as below:
However, I have a long running Matlab function on MPS and it times out after just 1 minute and not 5...
I get the error:
! com.mathworks.mps.client.MWHttpException: Failed HTTP request; Response Status: 504, Response Message: Gateway Time-out
! at com.mathworks.mps.client.internal.SunHttpClientFevalHandler.processRequest(Unknown Source)
! at com.mathworks.mps.client.internal.ComponentProxy.processRequest(Unknown Source)
! at com.mathworks.mps.client.internal.ComponentProxy.invoke(Unknown Source)
! at com.mathworks.mps.client.internal.SingleOutputDispatcher.dispatch(Unknown Source)
! at com.mathworks.mps.client.internal.MWClientInvocationHandler.invoke(Unknown Source)
! at com.sun.proxy.$Proxy75.CompareModels(Unknown Source)
What am I doing wrong?
static class MyClientConfig extends MWHttpClientDefaultConfig {
public long getTimeOutMs() {
log.info("MPS timeout set to 5 minutes");
return 5*6*1000; // 5 minutes
}
}
MWHttpClient client = new MWHttpClient(new MyClientConfig());
댓글 수: 0
답변 (2개)
Kojiro Saito
2022년 1월 7일
5*6*1000 is 30000 milliseconds (=30 seconds). Are you sure you set 5*60*1000 ?
public long getTimeOutMs() {
log.info("MPS timeout set to 5 minutes");
return 5*60*1000; // 5 minutes
}
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Installation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!