aws-s3 woes 3
At OML we use Amazon’s S3 for profile pics storage, we switched from local disk to S3 for scalability reasons when we need to move to multiple app servers or Amazon EC2. To implement S3 with attachment_fu was fairly straight-forward. However, we ran into a lot of problems with the aws-s3 gem. Basically the S3 backend, which uses aws-s3, failed with a broken pipe.
I did a bit of googling on this and found out the author of aws-s3 attempted to fix this in the latest subversion snapshot (# attempts changed to 10 by yours truly):
rescue Errno::EPIPE, Timeout::Error, Errno::EPIPE, Errno::EINVAL
@http = create_connection
attempts == 10 ? raise : (attempts += 1; retry)
endSo I checked out the latest SVN snapshot as a plugin, but it didn’t quite fix it, from time to time I still got the same error. So I ended up retrying it a couple more time in my own rescue block, if it still fails, then catch the exception and fail gracefully.
It seems to work for me, feel free to post comments if you are still having problems with profile pics… It would be great if you would also email the pics you tried to upload to feedback@onmylist.com
Thanks! Now go list your pants off!
Trackbacks
Use the following link to trackback from your own site:
http://blog.onmylist.com/articles/trackback/10
-
a04441f91fa389639871
-
Home made sex video. Home sex video. Amatuer home sex video vqq. Free home sex video. Nude sex home video.
Comments
-
Great tip!
-
Thanks for information. many interesting things Celpjefscylc
-
It also kept crashing for me. But it seems that the latest version fixed that issue, so right now it's working like magic.