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

I think we may have a memory leak #159

Open
maxdemarzi opened this issue Mar 26, 2014 · 10 comments
Open

I think we may have a memory leak #159

maxdemarzi opened this issue Mar 26, 2014 · 10 comments
Assignees

Comments

@maxdemarzi
Copy link
Owner

Can we double check https://github.com/maxdemarzi/neography/blob/master/lib/neography/rest/node_paths.rb for a potential leak?

I'm getting reports of R14s on Heroku and the issue may be lots of "paths" being generated.

@maxdemarzi
Copy link
Owner Author

See http://pastebin.com/2hkJ8LcJ

/Users/kwent/.rvm/gems/ruby-2.1.0/bundler/gems/neography-a4931670b7ff/lib/neography/rest/paths.rb String 16170

@rdvdijk
Copy link
Collaborator

rdvdijk commented Mar 26, 2014

Interesting. The two lines that stand out are:

/Users/kwent/.rvm/gems/ruby-2.1.0/bundler/gems/neography-a4931670b7ff/lib/neography/connection.rb          String                                                                                     17742

(17742 String objects in connection.rb)

and

/Users/kwent/.rvm/gems/ruby-2.1.0/bundler/gems/neography-a4931670b7ff/lib/neography/rest/paths.rb          String                                                                                     16170

(16170 String objects in paths.rb)

Any other concerns?

How can we recreate a similar log file with object counts? That 's useful during for debugging.

@rdvdijk
Copy link
Collaborator

rdvdijk commented Mar 26, 2014

I guess this StackOverflow issue is related?

@kwent
Copy link
Contributor

kwent commented Mar 26, 2014

Yeah i opened this issue few days ago and was hopping to receive help without success :( .

@maxdemarzi
Copy link
Owner Author

What if we refactor all those classes into modules?

That's my current plan I think...

@rdvdijk
Copy link
Collaborator

rdvdijk commented Mar 27, 2014

@maxdemarzi What would that fix? I think we should first identify what the exact problem is. What are all those String objects?

@mperham
Copy link

mperham commented Mar 27, 2014

I presume you've already seen this. sidekiq/sidekiq#1421 (comment)

@kwent
Copy link
Contributor

kwent commented Mar 27, 2014

Yes. But even running on Ruby 2.0.0, we noticed memory leak.

@maxdemarzi
Copy link
Owner Author

Latest dump => http://pastebin.com/VBPaV5mD

So it looks like it may not be the Rest class at all, but something borked with the "Phase 2" functionality.

@steveodom
Copy link

Any update on this?

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

5 participants