Short answer is that the thumbnailing built into Mezzanine really isn't
very compatible with a remote storages backend like S3. I'd suggest using
something else for thumbnailing, while disabling Mezzanine's - quickest way
to do that would be to add your own "thumbnail" template tag that overrides
Mezzanine's.

Long answer is that Mezzanine will generate thumbnails on the fly, when
they don't exist - in order for that to work with something like Heroku+S3,
it will still generate and store the thumbnails locally if they don't
exist, so that the check will pass each subsequent request, but they're all
thrown out each time you do a new deploy to Heroku, so the first request
after a deploy to each thumbnail will trigger the local regeneration and
re-push to S3.

Interested in others' thoughts on this but I think Mezzanine shouldn't act
like this actually works, and somehow fail fast for remote backends and
simply not do the thumbnail generation, instead just returning the original
image URL.


On Fri, Apr 4, 2014 at 1:25 PM, Paul Becotte <pjbeco...@gmail.com> wrote:

> So, I am up to 63 products on my cartridge site.  I am serving images from
> S3 using django-storages.  The backend is set to use DEFAULT_FILE_STORAGE =
> 'storages.backends.s3boto.S3BotoStorage'
>
> The problem is that when I access the "products" menu in the admin site, I
> get a Heroku timeout.  If I then reload it, it waits for a while and then
> loads, and works fine after that.  I am assuming this is the caching
> working as expected, but I am not sure why it is taking so long to load the
> page.  The debug toolbar on the first sucessful load (it doesn't report
> anything for the unsuccessful one!) shows cp time of 1180ms, SQL of 7
> queries in 39ms, but 903 log messages.  (If I leave the page and come back,
> there are no log messages).
>
> The messages look as follows.  I have no idea where to even begin
> troubleshooting this- does anyone have any suggestions of what to look at?
>
>  DEBUG 10:15:36 04/03/2014botoauth_path=/poppyschips/product/dunes13th.jpg
> /app/.heroku/python/lib/python2.7/site-packages/boto/s3/connection.py:622
> DEBUG10:15:36 04/03/2014 botoMethod: 
> HEAD/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:879DEBUG10:15:36
> 04/03/2014 botoPath: 
> /product/dunes13th.jpg/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:880DEBUG10:15:36
> 04/03/2014 
> botoData:/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:881DEBUG10:15:36
> 04/03/2014 botoHeaders: 
> {}/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:882DEBUG10:15:36
> 04/03/2014 botoHost: poppyschips.s3.amazonaws.com
> /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:883
> DEBUG10:15:36 04/03/2014 botoPort: 
> 443/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:884DEBUG10:15:36
> 04/03/2014 botoParams: 
> {}/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:885DEBUG10:15:36
> 04/03/2014 botoestablishing HTTPS connection: host=
> poppyschips.s3.amazonaws.com, kwargs={'port': 443, 'timeout': 70}
> /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:745
> DEBUG10:15:36 04/03/2014 botoToken: 
> None/app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:901DEBUG10:15:36
> 04/03/2014 botoStringToSign:
> HEAD
>
>
> Fri, 04 Apr 2014 02:15:36 GMT
> /poppyschips/product/dunes13th.jpg
> /app/.heroku/python/lib/python2.7/site-packages/boto/auth.py:146 DEBUG10:15:36
> 04/03/2014 botoSignature:
> AWS AKIAIPAFU5MCKWR46KCA:Nhinf3DuYX4lMTf5OyvsH8qLjrE=
> /app/.heroku/python/lib/python2.7/site-packages/boto/auth.py:150 DEBUG10:15:37
> 04/03/2014 
> botopath=/product/dunes13th.jpg/app/.heroku/python/lib/python2.7/site-packages/boto/s3/connection.py:620
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to