Profiling memory leaks in Rails
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.
August 22, 2006 at 1:04 pm
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].
[1] http://blog.seagul.co.uk/articles/2006/08/22/rails-leaking-some-strings-in-development