On 13 Jul 2011, at 14:43, Alex Mercer <alexey.boby...@gmail.com> wrote:

> Hi to all.
> I'm working with saving big files(~200mb) directly into db.
> I have issue with that.
> Caused by increased huge use of free RAM(about 3gb of ram and 3gb of
> swap) on stage when file saves to db:
> 
>    @job.pdf = params[:job][:pdf].read
> 
> After this is completed there is still some RAM and swap in use.
> Is there some way to optimize that?
> p.s. project on rails 3.0.3, uses mysql, running on mogrel.

I don't believe there is anyway in activerecord to stream blobs - the entire 
thing will get loaded into memory. It's not usually a great idea in general. 

Fred
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to