我们已经使用PHP s3 SDK将文件上传到s3一年多了,事情一直在顺利进行。昨天我们在上传文件的过程中间歇性地开始了400多次。我们重试3次并在尝试之间暂停5秒。
在许多情况下,重试有效,但并非总是如此。我们从S3收到的400(它是美国的标准桶)有一个空体,所以我不知道在哪里解决这个问题。
我们已经尝试在机器上同步时钟,因为如果时钟漂移有时会导致问题,但这也无济于事。
以下是我们收到错误的CFResponse的转储:
S3CFResponse::__set_state(array(
'header' =>
array (
'date' => 'Sun, 24 Nov 2013 21:44:09 GMT',
'server' => 'AmazonS3',
'connection' => 'keep-alive',
'transfer-encoding' => 'chunked',
'_info' =>
array (
'url' => 'https://REDACTED',
'content_type' => NULL,
'http_code' => 400,
'header_size' => 135,
'request_size' => 874,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.350825,
'namelookup_time' => 3.0E-5,
'connect_time' => 0.086817,
'pretransfer_time' => 0.263472,
'size_upload' => 0,
'size_download' => 0,
'speed_download' => 0,
'speed_upload' => 0,
'download_content_length' => -1,
'upload_content_length' => 1959,
'starttransfer_time' => 0.350749,
'redirect_time' => 0,
'certinfo' =>
array (
),
'method' => 'PUT',
),
'x-aws-request-url' => 'REDACTED',
'x-aws-redirects' => 0,
'x-aws-stringtosign' => 'PUT
image/jpeg
Sun, 24 Nov 2013 21:44:09 GMT
x-amz-acl:private
REDACTED',
'x-aws-requestheaders' =>
array (
'Content-Length' => '1959',
'Content-Type' => 'image/jpeg',
'Date' => 'Sun, 24 Nov 2013 21:44:09 GMT',
'Expect' => '100-continue',
'x-amz-acl' => 'private',
'Authorization' => 'AWS REDACTED',
),
),
'body' => false,
'status' => 400,
))).