Downloading files >3Gb from S3 fails with “SocketTimeoutException: Read timed out”

后端 未结 1 1653
暗喜
暗喜 2021-02-14 01:56

AWS Java SDK 1.9.3

When downloading many large files (~3Gb) from AWS S3 in Java server app I get SocketTimeoutException from time to time as following:

C         


        
1条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-14 02:56

    Here is how I can do in AWS SDK 1.9.3:

    ClientConfiguration config = new ClientConfiguration(); 
    config.setConnectionTimeout(connectionTimeout);
    config.setSocketTimeout(readTimeout); 
    AmazonS3 s3 = new AmazonS3Client(credentials, config);
    

    0 讨论(0)
提交回复
热议问题