More on Ruby Memory-Leak


I found some more interesting posts:

  1. Memory leaks in my site
  2. Rails memory usage case study
  3. bleak_house
  4. Finding open file descriptors: ‘lsof’ is a neat utility for listing open ports, sockets and files on a per process basis.
  5. The WeakRef and WeakHash.

Still I put it as following: I believe Ruby has a serious memory leak problem that is not been taken seriously. It is not even only about the memory leak. It is the GC that takes to long once the memory reaches a certain seize. Once our Application uses more then 2 GB of Memory the GC takes more then 50 secs to do its job. Then we have to do a restart of our Application because our Application should not be unresponsive for the User for 50 secs or more. PS: We got 12 GB of memory for Ruby on our server.

3 thoughts on “More on Ruby Memory-Leak

  1. You can fine tune the garbage collector slightly…like turn it off and only GC when you find it ‘convenient’ — but I’d say that it needs help, too 🙂
    Also you can specify (before compiling ruby) how often it runs. I left some recent thoughts on “gc.c” on the core list, but…anyway good luck!
    -Roger

  2. Also you could go to gc.c and enable “force_collect” and then do some memory management ‘on your own’ (kinda like C# unsafe or whatever it’s called). That might help.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s