-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multipart Upload reporting errors at end of upload in sdk v3 #669
Comments
Even if there are unsuccessful UploadPart operations somewhere in the middle of the multipart upload, it's best to let it all finish, because the |
Jeremy, I have seen the documentation about recovering from errors before. The documentation does not mention that it will upload all parts then exit with an error. Also not mentioned is that creating a new uploader will only upload the parts with errors. Thank you for giving me that info. Mark From: Jeremy Lindblom <notifications@github.commailto:notifications@github.com> Even if there are unsuccessful UploadPart operations somewhere in the middle of the multipart upload, it's best to let it all finish, because the UploadState tracks exactly which parts failed. When you get the state from the exception at the end, you can create a new MultipartUploader from the state that will only attempt to upload the missing parts. An example of this technique is demonstrated here: http://docs.aws.amazon.com/aws-sdk-php/v3/guide/service/s3-multipart-upload.html#recovering-from-errors — |
I will add some clarifications to the documentation. Thanks for the feedback. |
Jeremy, I changed my code around to use the method show in the recovering from errors section of the multipart upload documentation. I am now getting this error: PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with reason: Invoking the wait callback did not resolve the promise' in /usr/scripts/vendor/guzzlehttp/promises/src/functions.php:111 Any ideas how to resolve this error? Thanks,Mark From: Jeremy Lindblom <notifications@github.commailto:notifications@github.com> I will add some clarifications to the documentation. Thanks for the feedback. — |
Can you show us what your code looks like now? |
The code is as follows: $s3Uploader = new MultipartUploader ($s3Client, $fileHndl, $opt); fwrite (STDERR, " restarting upload on parts with errors" . PHP_EOL); } The showError function just prints out the errors from the exception. Thanks,Mark From: Jeremy Lindblom <notifications@github.commailto:notifications@github.com> Can you show us what your code looks like now? — |
Does the "Invoking the wait callback did not resolve the promise" error happen every time, or just some of the time? Side Note: I added some more documentation to the user guide for multipart uploads as per our earlier discussion. See 2df31b3 |
I tried the error recovery method on only one 6GB file. I tried it several times on that job and each time I received the fatal error. Mark From: Jeremy Lindblom <notifications@github.commailto:notifications@github.com> Does the "Invoking the wait callback did not resolve the promise" error happen every time, or just some of the time? Side Note: I added some more documentation to the user guide for multipart uploads as per our earlier discussion. See 2df31b32df31b3 — |
Hello, i'm not sure if it does belong here, but we have issues with multipart upload (just switched to aws v3.1.0), here is the error log:
this looks a bit odd to me - because file size is only 65MB |
I'm afraid is still happening in (3.3.0) |
@teseo Can you post a bit more detail? This ticket is still open because we have been unable to reproduce it. |
Exception message:
Exception Trace:
|
I changed the source parameter from a file resource handle (fopen) to a path. Now when the upload gets an error and goes through the catch function to restart the upload, it works as expected. Every time I used a file resource handle as the source and there were errors, it would crash with the message like I showed on July 1. |
@mwoodring Got it. The multipart uploader will create a fresh file handle when you give it a path, but it won't automatically rewind an open handle passed to its constructor. I'll update the docs to show how to use this technique with a stream instead of a path. |
… handle. Addresses aws#669
I've updated the documentation to warn about streams not being rewound automatically. Please feel free to reopen if you have any further questions. |
I am using the MultipartUploader function in the sdk v3. It appears that it uploads all the parts and at the end it goes through the catch exception code to report that multiple parts had errors during upload. Is there a way to stop the upload as soon as it gets an error so I can use the getState function to re-upload the bad part?
Here is the code I using:
The text was updated successfully, but these errors were encountered: