Make uploads work with very slow upload speeds

chunk uploads get a timeout of 2mins (derived from http.timeout).
On servers like kimsufi, uploads takes forever (100 MB/sec limit).
Currently, our upload code does not dynamically adapt itself to
changing the concurrency when network is slow.
This commit is contained in:
Girish Ramakrishnan
2018-03-20 19:18:48 -07:00
parent 7699f6721d
commit 6adf88a6e5
3 changed files with 9 additions and 3 deletions

View File

@@ -75,7 +75,8 @@ function getCaasConfig(apiConfig, callback) {
customBackoff: () => 20000 // constant backoff - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#retryDelayOptions-property
},
httpOptions: {
connectTimeout: 10000 // https://github.com/aws/aws-sdk-js/pull/1446
connectTimeout: 10000, // https://github.com/aws/aws-sdk-js/pull/1446
timeout: 300 * 1000 // https://github.com/aws/aws-sdk-js/issues/1704 (allow 5MB chunk upload to take upto 5 minutes)
}
};
@@ -107,7 +108,8 @@ function getS3Config(apiConfig, callback) {
customBackoff: () => 20000 // constant backoff - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#retryDelayOptions-property
},
httpOptions: {
connectTimeout: 10000 // https://github.com/aws/aws-sdk-js/pull/1446
connectTimeout: 10000, // https://github.com/aws/aws-sdk-js/pull/1446
timeout: 300 * 1000 // https://github.com/aws/aws-sdk-js/issues/1704 (allow 5MB chunk upload to take upto 5 minutes)
}
};