Reputation: 406
This is my current memory consumption on Heroku. I only have one endpoint that I see on scout being called repeatedly. It seems as if there is a lot of bloat during the startup and then it seems to plateau off later in the day. Is something like this indicative of a memory leak?
I've gone through and updated most of the gems I use to try and resolve this error. However, it's still very high and a bit concerning to me.
Here is my gem file.
source "https://rubygems.org"
ruby "2.3.1"
gem "rails", "5.0.1"
gem "aasm"
gem "active_model_serializers", "0.9.3"
gem "activeadmin-poro-decorator"
gem "activejob"
gem "api-auth"
gem "autoprefixer-rails"
gem "aws-sdk", "~> 2"
gem "axlsx", "2.1.0.pre"
gem "bcrypt"
gem "blanket_wrapper", require: "blanket"
gem "bootsnap"
gem "chroma"
gem "devise"
gem "dotenv-rails"
gem "dwolla_v2", "~> 1.1.2"
gem "foreman"
gem "geoip"
gem "httparty"
gem "jira-ruby", require: "jira-ruby"
gem "jquery-rails"
gem "kaminari"
gem "lightspeed_ruby", require: "lightspeed"
gem "mandrill-api", require: "mandrill"
gem "money-rails"
gem "omniauth"
gem "omniauth-lightspeed-pos"
gem "paid", git: "https://github.com/zamith/paid-ruby.git", branch: "zamith/support-pagination"
gem "paper_trail"
gem "paperclip"
gem "pg"
gem "phony_rails"
gem "puma"
gem "pundit"
gem "rack-attack"
gem "rack-cors", require: "rack/cors"
gem "roadie-rails", "~> 1.0"
gem "sidekiq"
gem "sidekiq-cron"
gem "simple_token_authentication", "~> 1.0"
gem "slack-notifier"
gem "slim-rails"
gem "stripe"
gem "textris"
gem "thor", "0.19.1"
gem "twilio-ruby"
gem "typhoeus"
gem "tzinfo-data"
gem "uglifier", ">= 1.3.0"
gem "validates_zipcode"
gem "webpacker", "~> 2.0"
gem "webpacker-react", "~> 0.3.1"
gem "wicked_pdf"
gem "wkhtmltopdf-binary"
gem "zepto-for-rails"
gem 'zip-codes'
gem "activeadmin", git: "https://github.com/activeadmin/activeadmin.git", ref: "01db1a"
gem "inherited_resources", git: "https://github.com/activeadmin/inherited_resources"
group :development do
gem "letter_opener"
gem "letter_opener_web"
gem "parity"
gem "rails-erd"
gem "subcontractor"
gem "web-console", "~> 2.0"
end
group :test do
gem "capybara"
gem "capybara-selenium"
gem "capybara_discoball"
gem "climate_control"
gem "codeclimate-test-reporter", "~> 1.0.0"
gem "database_cleaner"
gem "fake_stripe"
gem "fakeredis", require: "fakeredis/rspec"
gem "pdf-reader"
gem "rspec"
gem "rspec-retry"
gem "selenium-webdriver"
gem "simplecov"
gem "sinatra", "2.0.0.rc2"
gem "sinatra-contrib", "2.0.0.rc2", require: false
gem "sinatra-cross_origin"
gem "stackprof"
gem "timecop"
gem "vcr"
gem "webmock"
end
group :development, :test do
gem "factory_girl_rails"
gem "faker"
gem "headless"
gem "pry-rails"
gem "pry-remote"
gem "rspec-rails", "~> 3.4"
gem "rubocop"
gem "spring"
gem "spring-commands-rspec"
end
group :production, :staging do
gem "oj"
gem "rails_12factor"
gem "rollbar"
gem "scout_apm"
end
I'm having trouble interpreting whether this is a memory leak or memory bloat from boot.
Upvotes: 0
Views: 1335
Reputation: 196
This seems to be an ongoing issue with this gem, 2 years after this post.
I myself am experiencing memory issues with this gem.
Derailed Benchmarks twilio-ruby: 19.0 MiB
You can track the progress here as this issues is being addressed. https://github.com/twilio/twilio-ruby/issues/396
Upvotes: 1
Reputation: 400
Try the 'Derailed Benchmarks' gem. I noticed while running mine that the twilio-ruby gem was one of the biggest memory hogs @ 21MB.
https://github.com/schneems/derailed_benchmarks
Upvotes: 0