Amazon S3上传错误:将部件上传到分段上传时发生异常

时间:2015-09-29 05:54:17

标签: php curl amazon-web-services amazon-s3

我正在尝试使用AWS PHP SDK将30 GB文件上传到Amazon S3。

require('../vendor/autoload.php');

use Aws\S3\MultipartUploader;
use Aws\Exception\MultipartUploadException;

$client = new Aws\S3\S3Client([
'version' => 'latest',
'region'  => 'us-east-1'
]);

$bucket_name = 'Server3-27-SEP-2015';
$file_name   = 'S3_www_1443369605.zip';

$uploader = new MultipartUploader($client, $file_name, [
'bucket' => $bucket_name,
'key'    => $file_name,
'part_size' => '5368709120' // 5GB
]);

try {
    $result = $uploader->upload();
    echo "Upload complete \n";
} catch (MultipartUploadException $e) {
    echo "Upload error: " . $e->getMessage() . "\n";
}

适用于最大7GB的文件。上传30 GB文件后,脚本运行约2小时后出现以下错误:

将零件上传到分段上传时发生异常。以下部分有错误: - 第5部分:在“https://s3.amazonaws.com/Server3-27-SEP-2015/S3_www_1443369605.zip?partNumber=5&uploadId=xE1ohuuvqnuLyNeU7.TO.BSI6.ld9nchWkoTdWgtS4EyF9rEoRtT3z8SSsaogu6A6u_tb4FPL.WDG056xusaiw--”上执行“UploadPart”时出错; AWS HTTP错误:cURL错误55:SSL_write()返回SYSCALL,errno = 104(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html)(服务器):100继续 - - 第4部分:在“https://s3.amazonaws.com/Server3-27-SEP-2015/S3_www_1443369605.zip?partNumber=4&uploadId=xE1ohuuvqnuLyNeU7.TO.BSI6.ld9nchWkoTdWgtS4EyF9rEoRtT3z8SSsaogu6A6u_tb4FPL.WDG056xusaiw--”上执行“UploadPart”时出错; AWS HTTP错误:cURL错误56:SSL读取:错误:00000000:lib(0):func(0):reason(0),errno 104(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html)(服务器):100继续 - - 第2部分:在“https://s3.amazonaws.com/Server3-27-SEP-2015/S3_www_1443369605.zip?partNumber=2&uploadId=xE1ohuuvqnuLyNeU7.TO.BSI6.ld9nchWkoTdWgtS4EyF9rEoRtT3z8SSsaogu6A6u_tb4FPL.WDG056xusaiw--”上执行“UploadPart”时出错; AWS HTTP错误:cURL错误56:SSL读取:错误:00000000:lib(0):func(0):reason(0),errno 104(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html)(服务器):100继续 - - 第1部分:在“https://s3.amazonaws.com/Server3-27-SEP-2015/S3_www_1443369605.zip?partNumber=1&uploadId=xE1ohuuvqnuLyNeU7.TO.BSI6.ld9nchWkoTdWgtS4EyF9rEoRtT3z8SSsaogu6A6u_tb4FPL.WDG056xusaiw--”上执行“UploadPart”时出错; AWS HTTP错误:cURL错误55:SSL_write()返回SYSCALL,errno = 104(请参阅http://curl.haxx.se/libcurl/c/libcurl-errors.html)(服务器):100继续 -

0 个答案:

没有答案