S3Sync.net

General Category => Report Bugs => Topic started by: fumduq on February 02, 2011, 03:47:01 PM



Title: s3sync fails on 400 Bad Request
Post by: fumduq on February 02, 2011, 03:47:01 PM
I'm uploading a tree of a few thousand files to S3. Some files don't make it up (I don't have a pattern for which ones make it and which don't).

In this case, a file in that tree didn't make it up, and it said so in the logs. Is there a way to make it retry on 400?

Here is the relevant output:

$ s3sync.rb -p --make-dirs -r ~/v/ dest:dir/vtest3/ 2>&1 | tee s3sync2.out
S3 command failed:
put dir/vtest3/test.swf #<S3::S3Object:0x102240600> x-amz-acl public-read Content-Type application/x-shockwave-flash Content-Length 30226
With result 400 Bad Request


Title: Re: s3sync fails on 400 Bad Request
Post by: ferrix on February 03, 2011, 08:28:13 AM
Usually a 400 error means the client side has done something wrong, so that's why we don't just keep retrying it.  (Retries are done to 500 errors because amazon asks us to). 

If you want to change the range of errors we retry on, go into s3try.rb and change

Code:
break unless ((500...600).include? result.http_response.code.to_i) or forceRetry

to be 400...600 (for example)