amazon-s3-php-class
amazon-s3-php-class copied to clipboard
putObject retrun true when even the operation fail
Unfortunately I cannot reproduce consistently but lately I start seeing that the file is not uploaded on S3 (I cannot see it in the bucket) but the putObject return true as everything went well. I would like to be more specific but this is what I got so far. I would add more info as I gather more evidence. Any idea what the problem can be ?
If the $uri parameter start with "/" (Ex: '/var/www/js/myfile.js') the putObject return true as the file was successful uploaded but the file is not in the bucket anywhere. Obviously that is a bug if somebody passes that as $uri but I would expect an error/exception
Any update on this ? I have also noticed this happening.
It has started happening more frequently since last 1 or 2 months.
Case Scenario : The putObject returns true, and the files that were attempted to be uploaded/updated do not contain the changes if checked later. Anything related to eventual consistency limitations ?
Anyone has any updates on this ? This is such a Nasty issue, that I had to physically write an additional CRON(that runs after a few minutes) to verify this class did what it is supposed to be doing.
I have read elsewhere in forums that, quite a few times, S3 writes can fail(pretty bad I must say), but what is of concern is when we do not get an acknowledgement that it failed. This class gives a TRUE status(more frequently recently) even though the file did not make through successfully.
Please note that this trouble was not very frequent in the past. It has been happening more frequently since last one month or so.
The CRON I wrote to cross verify afterwards, did report that there have been instances where, the same file was reported to be succesfully put into S3 with a TRUE boolean status return. However, the same file was never uploaded successfully. The nature of the verification CRON is to keep retrying uploading the same item until it finally succeeds in verifying the write was successful. And it has reported in at least one such instance, where it has tried at least 3 times before the file could successfully be written and verified.
Unless this issue is resolved, this class can be pretty unreliable to be used.