willtrking/thumbor_aws — pull request #12 by clifff (2014-11-05 19:04:43+00:00)
Title: reuse boto connection in result storage

Vox Media is using this plugin on our Thumbor server to write out result storage. Occasionally, we see very long write times and Thumbor time outs. My first attempt at fixing these issues is just to reuse the Boto connection between request, because when we run with debug logs, you can see that every request is creating multiple new connections to S3, which seems inefficient.

This PR simply moves the boto connection to a class variable. We are currently using it on production and it still works, and haven't seen any of the timeout issues we experienced before yet.