amazon web services - Downloading file from s3 freezes and throws exception while network goes down temporary -
i using aws s3 sdk download file s3 bucket via transfermanager.
cases
1. file download successful if there no interruption in internet connectivity.
2. in case of network failure file downloading freezes time resumes if internet before socket timeout default(50 sec).
3.on increasing socket time out side
@bean public clientconfiguration clientconfiguration() { this.clientconfiguration = new clientconfiguration(); clientconfiguration.setsockettimeout(600*1000); return this.clientconfiguration; }
file downloading freezes,downloads bytes , freezes again after internet after hiccup. later throws connection reset exception.
com.amazonaws.sdkclientexception: unable store object contents disk: connection reset @ com.amazonaws.services.s3.internal.serviceutils.downloadtofile(serviceutils.java:313) @ com.amazonaws.services.s3.internal.serviceutils.downloadobjecttofile(serviceutils.java:270) @ com.amazonaws.services.s3.internal.serviceutils.retryabledownloads3objecttofile(serviceutils.java:402) @ com.amazonaws.services.s3.amazons3client.getobject(amazons3client.java:1455) @ com.amazonaws.services.s3.transfer.internal.downloadpartcallable.call(downloadpartcallable.java:59) @ com.amazonaws.services.s3.transfer.internal.downloadpartcallable.call(downloadpartcallable.java:31) @ java.util.concurrent.futuretask.run(futuretask.java:266) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745) caused by: java.net.socketexception: connection reset @ java.net.socketinputstream.read(socketinputstream.java:209) @ java.net.socketinputstream.read(socketinputstream.java:141) @ sun.security.ssl.inputrecord.readfully(inputrecord.java:465) @ sun.security.ssl.inputrecord.readv3record(inputrecord.java:593) @ sun.security.ssl.inputrecord.read(inputrecord.java:532) @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:973) @ sun.security.ssl.sslsocketimpl.readdatarecord(sslsocketimpl.java:930) @ sun.security.ssl.appinputstream.read(appinputstream.java:105) @ org.apache.http.impl.io.sessioninputbufferimpl.streamread(sessioninputbufferimpl.java:137) @ org.apache.http.impl.io.sessioninputbufferimpl.read(sessioninputbufferimpl.java:198) @ org.apache.http.impl.io.contentlengthinputstream.read(contentlengthinputstream.java:176) @ org.apache.http.conn.eofsensorinputstream.read(eofsensorinputstream.java:135) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ com.amazonaws.event.progressinputstream.read(progressinputstream.java:180) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ com.amazonaws.services.s3.internal.s3abortableinputstream.read(s3abortableinputstream.java:118) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ com.amazonaws.event.progressinputstream.read(progressinputstream.java:180) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ com.amazonaws.util.lengthcheckinputstream.read(lengthcheckinputstream.java:107) @ com.amazonaws.internal.sdkfilterinputstream.read(sdkfilterinputstream.java:82) @ java.io.filterinputstream.read(filterinputstream.java:107) @ com.amazonaws.services.s3.internal.serviceutils.downloadtofile(serviceutils.java:307)
my question how can configure client 1 can resume download of file @ anytime if network breaks down?
Comments
Post a Comment