I''m looking for tips on how to stomp memory leaks, as I haven''t a clue how to do it properly. I have a very young Rails 2.0.2 application that jumps from 180mb total usage to 510mb total usage in about 60-90mins. I tried using Dike and could not make heads or tails of the data. All I know is that the heaviest page on my site, dashboard#index, was producing 700,000+ String objects according to Dike, but I have no idea how to reduce that number, or where to even start looking. (As a primitive experiment, I commented out all the db queries in dashboard_controller and only reduced the number of string objects by about 30,000.) Some other info about my app: we use Rmagick fairly extensively, but there''s almost no traffic on the site right now as we still in a closed alpha testing stage. There are also fairly db-intensive routines in dashboard which compiles user and friend activities over the past couple of days. I haven''t introduced any form of caching yet, although I''m looking at Interlock/memcached. Any tips or links to good tutorials would be really helpful. I''ve seen all of the various solutions for finding leaks (Bleakhouse, MemoryProfiler, the aforementioned Dike), but unfortunately, I don''t know what to do after I''ve established that there is in fact a leak. Thanks :luis --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 21, 7:31 pm, "luis, syndeomedia" <l...-oF7mpmH9JiMmlAP/+Wk3EA@public.gmane.org> wrote:> I''m looking for tips on how to stomp memory leaks, as I haven''t a clue > how to do it properly. I have a very young Rails 2.0.2 application > that jumps from 180mb total usage to 510mb total usage in about > 60-90mins. I tried using Dike and could not make heads or tails of the > data. All I know is that the heaviest page on my site, > dashboard#index, was producing 700,000+ String objects according to > Dike, but I have no idea how to reduce that number, or where to even > start looking. (As a primitive experiment, I commented out all the db > queries in dashboard_controller and only reduced the number of string > objects by about 30,000.) > > Some other info about my app: we use Rmagick fairly extensively, but > there''s almost no traffic on the site right now as we still in a > closed alpha testing stage. There are also fairly db-intensive > routines in dashboard which compiles user and friend activities over > the past couple of days. I haven''t introduced any form of caching yet, > although I''m looking at Interlock/memcached. > > Any tips or links to good tutorials would be really helpful. I''ve seen > all of the various solutions for finding leaks (Bleakhouse, > MemoryProfiler, the aforementioned Dike), but unfortunately, I don''t > know what to do after I''ve established that there is in fact aleak. > > Thanks > > :luisdid you work through these? http://blog.methodmissing.com/2007/5/10/rails-memory-usage-case-study/ http://codehappy.wordpress.com/2007/01/17/tracking-a-memory-leak-in-rails/ --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It looks like your problem is rmagick as its been noted to have these issues http://blog.craigambrose.com/past/2007/11/27/image_management_that_will_scale/ read about RMagick and talking about exactly is what is going on why RMagick doesn''t release the memory in a constant running ruby app. http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---