Aws-sdk-js: AWS S3 Multipart upload restarting when reaching 12MB of loaded data

Created on 30 Mar 2016  路  3Comments  路  Source: aws/aws-sdk-js

I'm kind of having a hard time looking into this issue that i have posted on stackoverflow.

Dont know if posting it here is the right approach but any help will be awesome.

guidance

Most helpful comment

@adolfosrs
Can you take a look at your network connections through your browser when uploading a file? I'd like to know if any of the requests to S3 are timing out.

By default, the SDK has a timeout period of 2 minutes. If the connection is slow enough that a single part can't finish uploading within 2 minutes, then the SDK will attempt to retry uploading it. This could also happen if the connection is unstable/dropping enough packets that the SDK has to retry uploading a part.

It's possible to turn off the timeout, or change it.
Using the example in your stackoverflow post, you could turn it off by doing the following:

var bucket = new AWS.S3({
  apiVersion: '2006-03-01', 
  httpOptions: {timeout: 0}, 
  params: {Bucket: $scope.creds.bucket}
});

Let me know what you find out!

All 3 comments

@adolfosrs
Can you take a look at your network connections through your browser when uploading a file? I'd like to know if any of the requests to S3 are timing out.

By default, the SDK has a timeout period of 2 minutes. If the connection is slow enough that a single part can't finish uploading within 2 minutes, then the SDK will attempt to retry uploading it. This could also happen if the connection is unstable/dropping enough packets that the SDK has to retry uploading a part.

It's possible to turn off the timeout, or change it.
Using the example in your stackoverflow post, you could turn it off by doing the following:

var bucket = new AWS.S3({
  apiVersion: '2006-03-01', 
  httpOptions: {timeout: 0}, 
  params: {Bucket: $scope.creds.bucket}
});

Let me know what you find out!

@chrisradek This was exactly the problem. Thanks for the reply!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings