Good question. But I don't do anything like open or close. I just save the picture on upload.
Here is the add code that is when you press submit on the form def add if (params[:photo]) @photo = Photo.new(params[:photo]) if @photo.save flash[:notice] = "Picture saved" redirect_to :controller=>'photos',:action=>'index' end else @photo = Photo.new end end Trausti On Mon, Nov 30, 2009 at 4:42 PM, chris.reis...@gmail.com <chris.reis...@gmail.com> wrote: > One thing I could think of without seeing the code is maybe the files > are being opened while being saved, but you are not closing the files? > > Chris > > On Nov 29, 2:47 pm, Trausti Thor Johannsson <traust...@gmail.com> > wrote: >> Hi All, >> >> I have a small ruby on rails site, using passenger and apache. The >> site is moderately successful. It allows people to upload photos. It >> seems like when people upload photos, the memory is never returned, or >> very late, so on a busy day I can start to use 1 GB of swap in 30 >> minutes. >> >> I use the attachment_fu to handle the uploads. >> >> Any ideas on how to use less memory and give the memory back quicker ? >> >> Trausti > > -- > > 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-t...@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-t...@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.