Cloudmersive / Cloudmersive.APIClient.Java

Cloudmersvie API Client for Java. Uses OkHttp API client library.
Apache License 2.0
13 stars 5 forks source link

VirusScan api client java sporadically throws timeout for large files after a few seconds #6

Closed Michi-2142 closed 3 years ago

Michi-2142 commented 4 years ago

I'm using the java api client in v3.7.6 java api client to call virus scan file api.

The most time when I'm trying to upload a file with > 20MB everything is ok and I get a result but in some cases (I don't know when and why) the same file leads to timeout exception.

com.my.project.exceptions.ApiException: java.net.SocketTimeoutException: timeout
    at com.cloudmersive.client.invoker.ApiClient.execute(ApiClient.java:845)
    at com.cloudmersive.client.ScanApi.scanFileWithHttpInfo(ScanApi.java:148)
    at com.cloudmersive.client.ScanApi.scanFile(ScanApi.java:134)
....

I tried to reproduce this issue with a file with 250MB to check whether it is really a time issue, but this timeout throws after 7 seconds, so this could not be an issue. Looks like on server side something timeouts which I can not influence.

Cloudmersive commented 3 years ago

@Michi-2142 You can configure your timeouts to address this issue:

https://api.cloudmersive.com/configure-connection-timeout-client-configuration.asp