Reputation: 8113
I have a quite small Rails 3.1.1 application that rack up memory at lightning speed. 8-10 clicks in the application and I'm up to almost 1gb of RAM used.
We checked the log for slow running MYSQL queries, nothing there. We also checked Apache log, nothing there.
The application is running with Passenger 3.0
Can this issue be bound to some gem that is used? This application started as a Rails 3.0.1 application, and we updated the rails version. There are still [deprecated?] references in the gemfile. Here is the gemfile :
gem "rails", "~> 3.1.1"
gem "mysql2", "~> 0.3.6"
gem 'omniauth', '0.2.6'
gem 'json'
group :assets do
gem "sass-rails", "~> 3.1.4"
gem "coffee-rails", "~> 3.1.1"
gem 'uglifier'
end
gem 'jquery-rails'
gem 'execjs'
gem 'therubyracer'
gem 'capistrano'
Thanks
Upvotes: 1
Views: 366
Reputation: 11
Because therubyracer gem.
therubyracer with passenger make memroy leak.
delete therubyracer gem or use 0.7.5 version
Upvotes: 1
Reputation: 10314
It is all about eliminating possibilities. Some directions:
Upvotes: 2
Reputation: 6337
Instead of slow queries, check for inefficient queries -- that is, the kind that load lots of records from the DB, create lots of objects, and then loop over them on the Ruby side.
Or use a profiler such as New Relic.
Upvotes: 0