Delete lot of objects from S3 buckets get stucked.Why?
I am using the undesigned API for deleting the S3 objects.It working fine for me to delete upto 20 to 30 objects.IF I go for bulk delete like more than 100 or 200 its not responding.
I dont want to delete the S3 bucket.For 80 to 100 objects I am getting the result after that I am not getting the result in the php.The objects are not deleted from S3.I dont know why?
Edit
I implemented the Theodore R. Smith idea.Elachys also given the开发者_JS百科 same idea.But theodore is little bit breif.See my result below.
No use.I put the file write in my end for tracking the status.I selected 53 file and start the delete.But it stopped after 40 objects.Then sarted with 0kb files of 105 it stopped at 30 Assets.In file write I am getting the values for 105 object delete -- S3 deleted Started09:02:34
and the 30th delete ends at Completed S3 Delete 09:02:44
.Then 31st S3 delete started at Started S3 Delete 09:02:44
But didnt get the result from S3.
Anything I missed out please let me know.I didn't get the result up-to now.
Do you have any ideas?
Update
Solution:
Finally Fixed my issue by using the follwing API
https://raw.github.com/tylerhall/php-aws/master/class.s3.php
Now is working fine.Deleted more than 100 objects got the good result with in a seconds.Checked using S3fox also.Perfect!
Thank you everyone for answering the question
It sounds like the script might be timing out or not finishing execution in some way.
echo something at the bottom of your script and see if it displays.
If it's not a timeout issue, check your php error logs.
At a stretch, it could be some sort of "hammer protection". For debug purposes, try putting a sleep(1);
between each delete and see if it works then.
Try this:
At the top of your code put this:
set_time_limit(0);
Then take your loop where you do requests and sleep(5) after every 50. use the code if ($requestCount % 50 === 0) { sleep(5); }
Please make these two changes and report back.
精彩评论