Increase S3 API timeouts
parent
b22b11eb43
commit
b81729c558
10
s3.go
10
s3.go
|
@ -32,7 +32,7 @@ func preSign(req *http.Request, cred credential) *http.Request {
|
||||||
*req,
|
*req,
|
||||||
cred.AccessKey, cred.SecretKey, "",
|
cred.AccessKey, cred.SecretKey, "",
|
||||||
cred.Region,
|
cred.Region,
|
||||||
60*60, // seconds
|
1*60, // seconds
|
||||||
)
|
)
|
||||||
return signedReq
|
return signedReq
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ func initiateMultipartUpload(
|
||||||
key string,
|
key string,
|
||||||
cred credential,
|
cred credential,
|
||||||
) (initiateMultipartUploadResult, error) {
|
) (initiateMultipartUploadResult, error) {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
params := make(url.Values)
|
params := make(url.Values)
|
||||||
|
@ -157,7 +157,7 @@ func listParts(
|
||||||
cred credential,
|
cred credential,
|
||||||
partNumberMarker uint32,
|
partNumberMarker uint32,
|
||||||
) (listPartsResult, error) {
|
) (listPartsResult, error) {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
params := make(url.Values)
|
params := make(url.Values)
|
||||||
|
@ -231,7 +231,7 @@ func completeMultipartUpload(
|
||||||
parts []completePart,
|
parts []completePart,
|
||||||
cred credential,
|
cred credential,
|
||||||
) (completeMultipartUploadResult, error) {
|
) (completeMultipartUploadResult, error) {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
var body bytes.Buffer
|
var body bytes.Buffer
|
||||||
|
@ -281,7 +281,7 @@ func abortMultipartUpload(
|
||||||
key, uploadID string,
|
key, uploadID string,
|
||||||
cred credential,
|
cred credential,
|
||||||
) error {
|
) error {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
params := make(url.Values)
|
params := make(url.Values)
|
||||||
|
|
Loading…
Reference in New Issue