neurofuzzy, flash game development, rich internet applications, free source code – *alt.neurotica.fuzzy*

neurofuzzy, flash game development, rich internet applications, free source code – *alt.neurotica.fuzzy*

12/2/2006

Amazon S3 Tip, Check Availability First

Filed under: PHP — geoff @ 9:32 pm

If you’re using Amazon S3 in PHP (whether you are using the neurofuzzy s3 class or your own solution) it is a good idea to make sure you can access the service before you attempt any operations on it. If for some reason your site cannot access S3, it’s possible your server could get seriously bogged down or even crash if you aren’t careful.

In my experience, the PEAR HTTPrequest class doesn’t timeout properly out of the box. This means that if you can’t reach S3, HTTP requests will remain active, keeping processes running and possibly MySQL connections open. If you are running scripts that access S3 on a cron, or actively on your site’s pages, your request queues can back up, overloading your server.

 

Powered by WordPress