Timeout error ApiClient

Getting this today:

com.groupdocs.cloud.merger.client.ApiException: java.net.SocketTimeoutException: timeout
at com.groupdocs.cloud.merger.client.ApiClient.execute(ApiClient.java:789) ~[groupdocs-merger-cloud-22.5.jar!/:na]
at com.groupdocs.cloud.merger.api.FileApi.downloadFileWithHttpInfo(FileApi.java:426) ~[groupdocs-merger-cloud-22.5.jar!/:na]
at com.groupdocs.cloud.merger.api.FileApi.downloadFile(FileApi.java:412)

In the client configuration i set the timeout to 2 mins:

public static com.groupdocs.cloud.merger.client.Configuration getConfiguration(){

com.groupdocs.cloud.merger.client.Configuration cfg = new com.groupdocs.cloud.merger.client.Configuration(AppSID, AppKey);

cfg.setTimeout(120000);

cfg.setApiBaseUrl(ApiBaseUrl);

return cfg;
}

It should not take this long to merge two small docx documents. Can someone take a look please?


This Topic is created by vladimir.litvinchik using Email to Topic tool.

this is happening once every 3-4 requests to the merge API, the API hangs and the client times out. Can you see on your side what is happening?

I think sometimes it’s also the “upload” call (before the actual merge/join call) that times out:

fileApi.uploadFileWithHttpInfo(uploadRequest2)

this is our full stack trace:

com.groupdocs.cloud.merger.client.ApiException: java.net.SocketTimeoutException: timeout

at com.groupdocs.cloud.merger.client.ApiClient.execute(ApiClient.java:789)

at com.groupdocs.cloud.merger.api.FileApi.uploadFileWithHttpInfo(FileApi.java:690)

at uk.co.linx.innovation.pwp.web.utils.WordDocUtils.mergeWordDocumentsViaExternalAPI(WordDocUtils.java:130)

at uk.co.linx.innovation.pwp.service.CustomNoticeServiceImpl.generateCustomNoticeForOneAO(CustomNoticeServiceImpl.java:110)

at uk.co.linx.innovation.pwp.service.CustomNoticeServiceImpl.generateCustomNotice(CustomNoticeServiceImpl.java:94)

at uk.co.linx.innovation.pwp.service.AsyncNoticeBatchService.runBatch(AsyncNoticeBatchService.java:51)

at uk.co.linx.innovation.pwp.service.AsyncNoticeBatchService$$FastClassBySpringCGLIB$$e89de845.invoke()

at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:110)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.net.SocketTimeoutException: timeout

at okio.Okio$3.newTimeoutException(Okio.java:207)

at okio.AsyncTimeout.exit(AsyncTimeout.java:261)

at okio.AsyncTimeout$2.read(AsyncTimeout.java:215)

at okio.RealBufferedSource.indexOf(RealBufferedSource.java:306)

at okio.RealBufferedSource.indexOf(RealBufferedSource.java:300)

at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196)

at com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186)

at com.squareup.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127)

at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737)

at com.squareup.okhttp.internal.http.HttpEngine.access$200(HttpEngine.java:87)

at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:722)

at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:576)

at com.squareup.okhttp.Call.getResponse(Call.java:287)

at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)

at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)

at com.squareup.okhttp.Call.execute(Call.java:80)

at com.groupdocs.cloud.merger.client.ApiClient.execute(ApiClient.java:785)

… 18 common frames omitted

Caused by: java.net.SocketTimeoutException: Read timed out

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)

at java.net.SocketInputStream.read(SocketInputStream.java:171)

at java.net.SocketInputStream.read(SocketInputStream.java:141)

at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:457)

at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:68)

at sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1095)

at sun.security.ssl.SSLSocketImpl.access$200(SSLSocketImpl.java:72)

at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:815)

at okio.Okio$2.read(Okio.java:139)

at okio.AsyncTimeout$2.read(AsyncTimeout.java:211)

Hi @partywallpro

We are currently investigating this issue and will reply to you as soon as we have any findings.

Could you please confirm that you are experiencing the issue while working under the same user account (the one registered with this forum email)?

At the moment, we don’t see any timeouts or slow operations in our logs — all your requests appear to be processed successfully and quickly. We’ll continue our investigation, as it may be related to a network issue and requires deeper analysis.

Thanks for your patience.

Hi @partywallpro

We are currently investigating this issue and will reply to you as soon as we have any findings.

Could you please confirm that you are experiencing the issue while working under the same email address that is registered with this forum user?

At the moment, we don’t see any timeouts or slow operations in our logs — all your requests appear to be processed successfully and quickly. We’ll continue our investigation, as it may be related to a network issue and requires deeper analysis.

Thanks for your patience.

@partywallpro
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): MERGERCLOUD-95

@partywallpro,
Are you still experience issue? If so, could you please share your source code that cause the error, and the input files (without sensitive data), so we can check this?