Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twilio-ruby freeing too many memory slots #429

Closed
gemfarmer opened this issue Oct 12, 2018 · 6 comments
Closed

twilio-ruby freeing too many memory slots #429

gemfarmer opened this issue Oct 12, 2018 · 6 comments
Assignees
Labels
status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library

Comments

@gemfarmer
Copy link

gemfarmer commented Oct 12, 2018

This is a memory issue and is potentially related to #396.

I recently added the twilio-ruby gem to our rails application and suddenly started experiencing memory issues. Not only did our project's average memory usage increased (from stabilizing at ~500 MB to ~700/750MB), but our application started freeing up a ton of memory slots. Below are two charts of Free Memory Slots, based on heroku's runtime metrics.

Usage without twilio-ruby gem added:

screenshot 2018-10-12 12 23 18

Usage with twilio-ruby gem added:

Keep in mind that 50,000 free memory slots isn't too concerning. When I was actively using the gem, the number of free slots was quite a bit higher, sometims 600k+. All of this wouldn't be too concerning if my overall memory usage wasn't spiking, but as it is, I'm assuming that this is related.
screenshot 2018-10-12 12 23 26

Memory usage

With regards to #396, I'm not seeing the crazy numbers reported for twilio-ruby

Here is mine with a few other gems for comparison:
> bundle exec derailed bundle:mem
rails: 9.5508 MiB (Also required by: active_record/railtie, active_model/railtie, and 13 others)
twilio-ruby: 11.2109 MiB
pg: 3.8047 MiB
devise: 1.6914 MiBaction_dispatch/middleware/stack)

Version:
gem 'twilio-ruby', '~> 5.14', '>= 5.14.1'

Steps to Reproduce

  1. Add it to your Rails Project
  2. Add project to Heroku
  3. Follow steps here to add Ruby runtime Metrics
@philnash
Copy link
Contributor

Oh wow, this is interesting. Thank you for the in depth report. I've been planning a look at the memory usage (as you'll have seen in #396) but not had the chance yet. This is another good reason to dig in though. I'll try to get this onto my schedule in the next few weeks.

@philnash philnash self-assigned this Oct 22, 2018
@gemfarmer
Copy link
Author

gemfarmer commented Nov 7, 2018

Thanks @philnash. What other information do you need to dig into it more?

@acflint
Copy link

acflint commented Dec 6, 2018

+1 on this. Came here looking for any one else reporting memory issues. Thank you @philnash for getting it on the schedule!

@gemfarmer
Copy link
Author

@philnash any update on this?

@philnash
Copy link
Contributor

I've updated #396. Would be interested to see if that work has helped here too. Any testing and feedback would be appreciated.

@gemfarmer
Copy link
Author

@philnash thanks for updating. I'll test as soon as possible!

@childish-sambino childish-sambino added status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library labels Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

4 participants