Comments (3)
Tuning the timeout values is the proper solution in this case.
The SDK uses default timeout values that will work on most of the use cases. At the same time, we expose client configurations that you can customize to fit your specific use case, like running in an environment with high latency connectivity.
We suggest you generate the SDK client-side metrics to have an insight of the client performance in its own application environment. The metrics can be used to define what's the best timeout value to set in the client. For instructions on how to generate the metrics, check the Developer Guide and the blog post.
from aws-sdk-java-v2.
The timeout tuning mechanism is the viable solution for now but not the reliable solution, let me explain why;
there could be files of different sizes to be uploaded, so setting a fixed timeout is not a reliable solution. We have checked the different timeout values on files with different sizes, let's say, timeout = 1 min
is fine for file sizes up-to 20MB or 25MB, but the very same timeout value is not fine for a file having size more then 25MB as the error occurs stating that Write timeout as mentioned above. So, how can we define a timeout value that works for all file sizes ? or, is there any other way around to manipulate the write timeout value at runtime while file is uploading, according the the internet speed and file size ?
from aws-sdk-java-v2.
A timeout that will work for all file sizes is a higher timeout. You can use AwsRequestOverrideConfiguration to set some timeouts at the request level, but not all timeout settings are available. If you don't want a timeout that is too high for the smaller files, you can create different clients with different settings: one s3 client with lower timeouts for the small files, and another s3 client with higher timeouts for the bigger files.
I still highly recommend to generate the SDK client-side metrics. You can then interpret the SDK metrics of your client to help define better custom settings.
We do have two blog posts that show how to interpret the client-side metrics to improve resiliency of your application (note that the blog posts show Java SDK v1 code, but the theory behind is the same, and most of the v1 metrics have v2 equivalents):
- Tuning AWS Java SDK HTTP request settings for latency-aware Amazon DynamoDB applications - link
- Tuning the AWS SDK for Java to Improve Resiliency - link
Out of curiosity, have you tried using the S3CrtAsyncClient in the S3TransferManager, instead of NettyNio? It would be interesting to see how the S3 CRT client performs in comparison to Netty in this case.
from aws-sdk-java-v2.
Related Issues (20)
- Shared S3Client doesn't shutdown gracefully
- DynamoDbAutoGeneratedTimestampAttribute custom date format and time zone HOT 4
- Provide an example for using ErrorType metrics
- Empty Content-Encoding header with S3 CRT client HOT 4
- S3Client.builder() without credentials provider behaves differently than if set explicitly to DefaultCredentialsProvider.create() HOT 3
- S3 HeadBucket 301 Error HOT 3
- S3 CRT client is almost an order of magnitude slower than the Netty client HOT 5
- Polly: DescribeVoices does not return long-form in supported engines HOT 2
- EC2 Waiter `waitUntilInstanceRunning` Hanging When `DescribeInstancesRequest` Empty HOT 5
- sigv4 for Lattice unsigned-payload not supported for http requests HOT 1
- Failed to Assume Role With Web Identity to China HOT 7
- AWS SDK contains a copy of slf4j which causes problems for the components that have slf4j on the path for imports. HOT 3
- software.amazon.awssdk.core.exception.SdkClientException: Unable to unmarshall response (null). Response Code: 200, Response Text: OK when calling `PutItem` HOT 10
- MediaLive waiter does not wait long enough. No configuration HOT 4
- endpoints-spi is missing in bom HOT 2
- MediaLive waitUntilInputDeleted does not work. HOT 10
- ClassNotFoundException after Spring Boot Native Image compilation for s3/internal/ApplyUserAgentInterceptor.java HOT 4
- CognitoIdentityProviderClient.adminInitiateAuth is consistently failing. What is missing? HOT 6
- Add GetSpotInstancesAction to retrieve action from spot instances like on demand instances HOT 4
- AsyncRequestBody: ability to set content-type HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-java-v2.