Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Profiling memory leaks in Rails

By Peter Cooper / August 22, 2006

Scott Laird looks at how to profile memory leaks in Rails:

One of my long-running problems with Rails (and Ruby in general) is that it’s difficult to debug memory leaks. I’ve had a number of cases where I’ve stuck something into a long-lived array or hash and discovered much later that my Ruby process was eating over 100 MB of RAM. While ps makes it easy to see when Ruby’s using lots of RAM, actually figuring out where it went is a lot harder.


  1. Chris Roos says:

    I've already posted this to Scott's blog.

    I used the memory profiler this morning and think I found a memory leak when rails is used in development, in conjunction with irb_history[1].


Other Posts to Enjoy

Twitter Mentions