On 13 Jul 2011, at 14:43, Alex Mercer
<alexey.bobyrev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.