Rails 3.0.7 memory leak

I have a weird memory issue in two different rails applications. Both applications use rails 3.0.7. Each controller request allocates 20-30-50 mb of memory. In production mode, this amount is reduced to 5-10. But this is the same.

This is a list of gems that are used by both applications:

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' 

Disabling all of these gems does not give me any results. I am trying to use mysql instead of pg, but the result is the same.

I am doing memprof, and here it is → http://memprof.com/dump/4dcbb1e37fdeb632fd000001

Maybe someone can take a look at memprof and give me some idea?

I know that I need to look at my code and try to find an error, but this happened on two different (!!) rails!

Thanks!

+6
source share
1 answer

FYI, we had a similar problem, reverted to Rails 3.05, and the memory leak / bloat disappeared. I think this is due to garbage collection.

+2
source

Source: https://habr.com/ru/post/888016/


All Articles