Hi like the current approach.  

I just configured my storage backend to S3, so direct links work, but 
additionally added media-file serving for the local thumbnails to my heroku 
application. Regeneration on Heroku deploy is fine with me, since it is only 
once.  

Best way (for the future) IMHO would be to configure the thumbnail storage 
backend separately from the file storage backend.  
Default behavior could be as it is now.  

When someone wants to save the thumbnails on S3, they can use a S3 backend for 
this (but this will be slow because of the exist-queries).  
Added caching (local files or just cache the exist-query) could also be done in 
the storage backend.  




Am Freitag, 4. April 2014 um 05:50 schrieb Stephen McDonald:

> 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 <[email protected] 
> (mailto:[email protected])> 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/2014
> > boto
> > auth_path=/poppyschips/product/dunes13th.jpg
> > /app/.heroku/python/lib/python2.7/site-packages/boto/s3/connection.py:622
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Method: HEAD
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:879
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Path: /product/dunes13th.jpg
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:880
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Data:
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:881
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Headers: {}
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:882
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Host: poppyschips.s3.amazonaws.com (http://poppyschips.s3.amazonaws.com)
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:883
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Port: 443
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:884
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Params: {}
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:885
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > establishing HTTPS connection: host=poppyschips.s3.amazonaws.com 
> > (http://poppyschips.s3.amazonaws.com), kwargs={'port': 443, 'timeout': 70}
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:745
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Token: None
> > /app/.heroku/python/lib/python2.7/site-packages/boto/connection.py:901
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > StringToSign:
> > 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
> >  
> > DEBUG
> > 10:15:36 04/03/2014
> > boto
> > Signature:
> > AWS AKIAIPAFU5MCKWR46KCA:Nhinf3DuYX4lMTf5OyvsH8qLjrE=  
> > /app/.heroku/python/lib/python2.7/site-packages/boto/auth.py:150
> >  
> > DEBUG
> > 10:15:37 04/03/2014
> > boto
> > path=/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 [email protected] 
> > (mailto:[email protected]).
> > 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 [email protected] 
> (mailto:[email protected]).
> For more options, visit https://groups.google.com/d/optout.


—  
Denis  

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to