-
Notifications
You must be signed in to change notification settings - Fork 487
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
Try to recover from HTTP status code 503 and connection reset by not deleting the file but using a exponential backoff retry strategy #1255
Comments
This is a non-S3 API behavior minio-java is an S3 API compatible SDK what are the alternatives for S3 API from B2 ? |
Regarding HTTP status code 503 Amazon AWS states this too:
From https://aws.amazon.com/premiumsupport/knowledge-center/s3-503-within-request-rate-prefix/ |
503 is automatically retried by Okhttp @SailReal you need to provide a retriable HTTP client and okhttp provides such provisions. We do not do anything special on our end instead it's up to you to write a retriable So you can provide a custom httpClient that does what you want we do not initialize this ourselves, so you should do what you want.
|
Please pass custom OkHttpClient for any specific requirements. |
FYI: I just looked again into this issue and found out that our application needs to provide a custom interceptor because minio-java/api/src/main/java/io/minio/S3Base.java Lines 515 to 519 in f8de495
|
Summary
While uploading some files using
minio-java
to Backblaze, we encounter503
(ServiceUnavailable) HTTP status codes as well as connection resets (SocketException: Connection reset
) which always results in the file didn't upload successfully.System Setup
Steps to Reproduce
Upload some files to Backblaze
Expected Behavior
File is uploaded
Actual Behavior
Sometimes a
503
status code is returned or aconnection reset
is initiated by the cloud which both aborts the upload.Reproducibility
Intermittent
Relevant Log Output
HTTP status code
503
Connection reset
Relevant Log Output
@pawanrai9999 did some research and has found out the following:
From https://www.backblaze.com/b2/docs/integration_checklist.html
We could implement such an exponential backoff retry strategy in our application logic but IMO it would be better kept here and would especially help other users who encounter this problem as well.
The text was updated successfully, but these errors were encountered: