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

leaking method sites on activemodel attributes #60

Closed
abrandoned opened this issue May 30, 2017 · 3 comments
Closed

leaking method sites on activemodel attributes #60

abrandoned opened this issue May 30, 2017 · 3 comments

Comments

@abrandoned
Copy link
Collaborator

Not sure where the leak is, but this method defines a new method when a proxy is created for the attributes that are defined https://github.com/rails/rails/blob/4-2-stable/activemodel/lib/active_model/attribute_methods.rb#L383

the value of __FILE__ is stored > 14,000 times in a single running process of synchronicity-subscriber ... this is the only spot this is called; may be because of JRuby (and not active_remote), but my assumption is active_remote because we recently refactored the methods that influence if a method is generated ... looking for additional evidence

@liveh2o @brianstien

@abrandoned
Copy link
Collaborator Author

may be a jruby problem ... the system gets to a steady state after defining methods on the models and doesn't continue redefining them ... so the file string being present 14,000+ times in a heap dump must be related to the internals of how method definitions are stored (but does not manifest elsewhere)

@liveh2o
Copy link
Owner

liveh2o commented Feb 28, 2018

Is this still relevant, @abrandoned?

@liveh2o liveh2o closed this as completed Apr 18, 2022
@liveh2o
Copy link
Owner

liveh2o commented Apr 18, 2022

Closing since this appears related to Rails 4.2, and we're now supporting 6.0 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants