我有一个脚本,该脚本生成许多XML文件,并使用以下基本代码将它们一个接一个地上传到S3:
$this->awsFactory->getS3Client()->putObject([
'Bucket' => $bucketName,
'Key' => $key,
'Body' => $xml,
'ACL' => 'public-read',
'@http' => [
'progress' => function ($expectedDl, $dl, $expectedUl, $ul) {
printf(
"%s/%s uploaded.\n",
$ul,
$expectedUl
);
}
]
]);
(由于我的问题,我添加了回调)
有时,上传会被卡住,并且永远不会超时。有时几分钟后它会重新启动,有时则不会。 它可以在60个文件之后发生,或者在150个以上文件之后发生,完全是随机的
这里是回调示例:
0/0 uploaded.
0/2128256 uploaded.
16384/2128256 uploaded.
16384/2128256 uploaded.
32768/2128256 uploaded.
32768/2128256 uploaded.
49152/2128256 uploaded.
// ...
// (it start normally)
// And at a moment, the upload stop send datas
// ...
1048576/2128256 uploaded.
1064960/2128256 uploaded.
1064960/2128256 uploaded.
1081344/2128256 uploaded.
1081344/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
1097728/2128256 uploaded.
// ...
它停留在1097728/2128256,我得到了成千上万条相同的线
有什么想法吗?
感谢您的帮助:)