Rails application not freeing memory?

1.4k views Asked by At

In my rails application total object are increasing with every request. Objects are not freeing after GC runs. I am using Rails 3.2.3 and ruby 1.9.3.

Can someone point me in right direction ? Where to start?

What are the available tools ?

Tools which I tried. ObjectSpace is not referencing a line where these objects created. Memprof is not working with ruby 1.9.3. Oink is not referencing a line where these objects created.

1

There are 1 answers

0
Andrew Grimm On

perftools.rb has the ability to mention what methods create how many objects:

CPUPROFILE_OBJECTS=1

Profile object allocations instead of cpu/wall time. Each sample represents one object created inside that function.

However, that's profiling all objects, not merely un-garbage-collected objects. Also, it segfaults on me some of the time.