Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to upload to S3 - SocketTimeoutException/Broken Pipe #71

Closed
Arjun-Android-Trantor opened this issue Oct 20, 2015 · 18 comments
Closed
Labels
question General question

Comments

@Arjun-Android-Trantor
Copy link

Hi,

We are getting the SocketTimeoutException/Broken Pipe issue while uploading to S3 same as mentioned in #37 Unable to upload to S3 - SocketTimeoutException posted by @thomasdao.

We are using aws-sdk version 2.2.4 and I am working on android lollipop 5.0.1.

Thanks

@fosterzhang fosterzhang added the question General question label Oct 20, 2015
@fosterzhang
Copy link
Contributor

Does it happen all the time? What region is your S3 bucket in and where do you connect it from? FYI, the default connection timeout and socket timeout are 15 seconds. If you are on a slow network, I suggest you increase these values via ClientConfiguration.

@Arjun-Android-Trantor
Copy link
Author

Thanks for replying

No, it's an intermittent issue. S3 bucket is in US Standard region. We are connecting from India.We have increased both connection timeout and socket timeout.

@v1bh0r
Copy link

v1bh0r commented Oct 20, 2015

@Arjun-Android-Trantor: Even if you give a very long timeout, catch the exception and exit gracefully; Check for network connection too and show offline if not connected.

@Arjun-Android-Trantor
Copy link
Author

@vibhor86 : The exception comes at aws sdk and we are not getting any callback or exception for that at our end.

@fosterzhang
Copy link
Contributor

@Arjun-Android-Trantor Do you use TransferUtility or S3 client's putObject? With server side encryption or not?

@Arjun-Android-Trantor
Copy link
Author

@fosterzhang We are using S3 client's putObject with TransferManager without any sever side encryption.

@fosterzhang
Copy link
Contributor

@Arjun-Android-Trantor what device/emulator do you use? At which point does it fail, say right when the transfer starts or in the middle?

@Arjun-Android-Trantor
Copy link
Author

we are using Samsung Galaxy S3 device. It fails between range 10 to 30 % while uploading.

@vibhor-trantor
Copy link

@Arjun-Android-Trantor: Have you been able to replicate the issue on other devices and/or emulator?

@Arjun-Android-Trantor
Copy link
Author

@vibhor86 We are not able to replicate the issue as it comes randomly on emulator as well as on nexus 4 and Samsung Galaxy S5.

@vibhor-trantor
Copy link

@Arjun-Android-Trantor: "We are not able to replicate the issue as it comes randomly"; Is this a correct interpretation of your statement? - You are able to replicate the issue on different devices and emulators, but randomly and not consistently

@Arjun-Android-Trantor
Copy link
Author

@vibhor86 Yes, the issue is not consistent and occurs randomly.

@Arjun-Android-Trantor
Copy link
Author

@fosterzhang We have upgraded the aws sdk to 2.2.7 from 2.2.4 and tested on same devices and the S3 upload works fine without any exception. In future, if we get any issue regarding the same, we'll let you know.

@fosterzhang
Copy link
Contributor

@Arjun-Android-Trantor glad that 2.2.7 works out for you. Don't hesitate to let me know when the issue comes up again. I'll keep an eye on this thread for a while.

@kapil-mangtani
Copy link

I am facing the same issue with 2.2.5. We get this exception only for the first upload in our android app, after that everything works fine!

Edit: Upgrading to 2.2.7 worked for me as well!

@SilvestreRamirez
Copy link

someone found the solution?

@komeiming
Copy link

Programe works well in debug, but failed upload into AWS lambda, issue with version 2.15.20, we got the below details exceptions in S3 cloudWatch:

2020-12-28T13:25:59.109+08:00 2020-12-28T05:25:59.108Z [main] DEBUG software.amazon.awssdk.request - Retryable error detected. Will retry in 66ms. Request attempt number 3

2020-12-28T13:25:59.109+08:00 software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Broken pipe (Write failed)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:98)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:43)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:205)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:66)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:34)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80)

2020-12-28T13:25:59.109+08:00 at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60)

@jamesonwilliams
Copy link
Contributor

jamesonwilliams commented Dec 29, 2020

@SilvestreRamirez @komeiming This issue is five years old, and is about version 2.2.4 of the SDK. Current version is 2.20.1. If you're having an issue with the latest version of the Android SDK, you should open a new issue. Also, @komeiming, please see these notes on using Markdown formatting with GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question
Projects
None yet
Development

No branches or pull requests

8 participants