memory leak stomping

1 view
Skip to first unread message

luis, syndeomedia

unread,
Dec 21, 2007, 10:31:54 PM12/21/07
to Ruby on Rails: Talk
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

gene tani

unread,
Dec 22, 2007, 10:49:38 AM12/22/07
to Ruby on Rails: Talk

Rob Schultz

unread,
Dec 22, 2007, 5:58:35 PM12/22/07
to rubyonra...@googlegroups.com
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/.

Reply all
Reply to author
Forward
0 new messages