Memory leak stomping

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.



On Dec 21, 7:31 pm, “luis, syndeomedia” [email protected] wrote:

know what to do after I’ve established that there is in fact aleak.



did you work through these?

It looks like your problem is rmagick as its been noted to have these
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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs