Memory Leak

Does anybody here had any luck on tracking down memory leaks on Rails
apps?

i’ve got a small application that no matter what i try to do,the
mongrels processes keep growing and growing up.I’ve heard Evan made
this gem called bleak house to help people track down memory leaks,but
I couldnt get anything helpful from thoses graphs its generate.Does
anybody have any suggestions?

 Thankz in advance!

Sorry I don’t have an answer for you at the moment, but I would make
the same request.

I have recently started to experience serious memory leaks in my two
live apps (running on different servers). I am using lighttpd and
fastcgi on Fedora 8 and 9.

One is using Rails 2.0.2,and one Rails 1.2.6
Ruby version 1.8.6 (2008-06-20 patchlevel 230)

I also seem to get the memory leak on my development system running
mongrel. I am currently investigating and will post back here with
anything I come up with that may help.

I only noticed the problem when I was investigating a hardware
failure, but had been getting comments from users about slow responses
for a little while.
I am monitoring the process memory size and watch it grow every few
requests.

If anyone can help that would be great.

Tonypm

On 9 Oct 2008, at 08:59, tonypm wrote:

ruby 1.8.6 p230 is screwed and known for leaking and segfaulting.

Fred

Does patchlevel 111 have the same problem as well?

 I've been running ruby 1.8.6 patchlevel 111 on mac,but the

processes grow slightly every request.On my production server running
debian,I’ve got ruby 1.8.5 from 2006-08-25,and because I’ve got a lot
of traffic on my production server,memory goes away really fast!I’ll
update to ruby 1.8.6 latest release and post the results here.

Thankz!

Thanks Fred,

Fedora updated Ruby to:

ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux]

problems now all gone away - much relieved!!

Tonypm

On 14 Oct 2008, at 03:07, Alex Gregianin wrote:

Does patchlevel 111 have the same problem as well?

I've been running ruby 1.8.6 patchlevel 111 on mac,but the

processes grow slightly every request.On my production server running
debian,I’ve got ruby 1.8.5 from 2006-08-25,and because I’ve got a lot
of traffic on my production server,memory goes away really fast!I’ll
update to ruby 1.8.6 latest release and post the results here.

shouldn’t do (p230 is where the bad stuff happens).
It is perfectly possible to have a memory leak that is your fault -
see if you can isolate it to a segment of code that leaks

Fred

We’re running mongrels on Ubuntu with Ruby 1.8.6-p114, and memory of
each process is slowly increasing, so we have to restart them every
couple of days or so.

Anybody else having to do this? I tried to use bleak-house, but that
refused to work without sigsegv’ing. So I’ve written a simple action
that walks the ObjectSpace and counts the number of objects per class
and renders them. Nothing obvious there that would account for 20MB of
leakage.

When we start mongrel, they use 60MB quickly, and then slowly increase
memory every request. When they’re at 90MB or 100MB, we restart them
(because we have 18 running on one box, and they use up lots of memory).

Have some question to you guys:

  • How often do you restart mongrels?

  • How much memory does your mongrel orocess use (after a couple hours of
    uptime)?

  • What Ruby version is the most recommended?

thx
Andrej