Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails 3.0.7 memory leak

I have some strange issue with memory on my two different rails applications. Both application use rails 3.0.7. Each of controller request allocate 20-30-50 mb of memory. In production mode this amount decrease to 5-10. But this is the same things.

This is the list of gems which used by both of application:

gem 'pg' 
gem 'haml' 
gem 'sass' 
gem 'devise' 
gem 'simple_form' 
gem 'state_machine' 
gem "globalize3", "0.1.0.beta" 
gem "easy_globalize3_accessors" 
gem 'paperclip' 
gem 'andand' 

Switching off all of this gems doesn't give me any results. I try to use mysql instead of pg but result is same.

I make memprof and here it is -> http://memprof.com/dump/4dcbb1e37fdeb632fd000001

Maybe someone can look at memprof and give me any idea?

I know what i need to look at my code and try to find mistake, but this happend on two different (!!) rails application!

Thanks!

like image 887
vorobey Avatar asked May 13 '11 09:05

vorobey


1 Answers

FYI, we had a similar issue, reverted back to Rails 3.05 and the memory leak/bloat went away. It has to do with garbage collection, I believe.

like image 199
Ramie Avatar answered Oct 30 '22 20:10

Ramie