are the objects with paperclip attachments too large for memcache?

25 views
Skip to first unread message

Dmitry Amechenko

unread,
Nov 8, 2009, 6:27:39 PM11/8/09
to boston-r...@googlegroups.com
Anybody knows how paperclip attachments work? I'm trying to memcache a
message.rb model object and get "SERVER_ERROR object too large for
cache", i'm guessing because the message object has a paperclip
attachment. Is there any way to memcache only the message object and
have attachment lazy loading from the file store? One way to go about
it would be to bump up the memcache object size limit, but this is not
the direction i'd want to choose.

thanks

Josh Nichols

unread,
Nov 9, 2009, 1:38:34 PM11/9/09
to boston-r...@googlegroups.com
I haven't looked into these particulars of the paperclip
implementation, but... paperclip generally only has a filename of a
local file, and doesn't actually read it into memory. So, I kinda
doubt that is what is causing the problem.

- Josh

Dmitry Amechenko

unread,
Nov 9, 2009, 1:54:12 PM11/9/09
to boston-r...@googlegroups.com, boston-r...@googlegroups.com
Yeh, I actually confirm that
Works fine on the dev box regardless of the attachment size, perhaps
something else is going on

Thanks


Sent from my iPhone

On Nov 9, 2009, at 13:38, Josh Nichols <jo...@technicalpickles.com>
wrote:

Dmitry Amelchenko

unread,
Nov 10, 2009, 7:56:59 AM11/10/09
to boston-r...@googlegroups.com
So, it clearly has nothing to do with paperclip (well, maybe)

Appears to be a more general memcaching problem. Perhaps the model objects i'm trying to memcache have too many dependents that get sucked in -- I don't really have that much experience with memcache yet. I'm unable to reproduce the problem in dev. So, is there some memcaching debugging technique? Can i analyze what objects and their properties end up cache? Any useful documents, sites? Surprisingly I was not able to find much information on the web. Is it even a well accepted practice to cache the entire model object?
 
Any advise would be highly appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Boston Ruby Group mailing list
To post to this group, send email to boston-r...@googlegroups.com
To unsubscribe from this group, send email to boston-rubygro...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/boston-rubygroup
-~----------~----~----~----~------~----~------~--~---


Reply all
Reply to author
Forward
0 new messages