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
Huge memory leaks & CPU usage after editing pages. #2434
Comments
I assume that this isn't related to #2278? That is, you're not running in production mode and/or you don't have a huge number of records in your DB. |
Hmm - I'm actually working with an obfuscated dump of my production database but it's only ~1500 rows - reckon that's the culprit? I'm in development mode. |
Update: no, that doesn't look like it's the culprit - I dumped my database and started again; I'm still getting ~100% CPU usage & memory leaks in development mode with ~10 rows on one table when I try changing anything. |
I'm seeing the same issues in development (with hardly anything in my database) after just navigating around the admin area (not even editing my records). Mac Mini: 2.5ghz dual core i5, 4gb of ram |
I'm experiencing this too, in any environment. Disabling With I think it tries to render the exception and then:
This really slows the development time :/ Does anyone has any idea how to wrap the whole activeadmin action with Note: I think it's |
Thanks @jtomaszewski — that fixes it for me (but obviously not a great solution to have to disable |
I've been seeing this a lot as well. The problem is exactly as @jtomaszewski described. I haven't tried messing with disabling |
I'm thinking this is actually Arbre's fault. The slowdown only seems to happen in Arbre's To clarify: what happens for me is the Ruby process pegs the processor for some period of time, then it uploads 30-70 MB of data to Firefox, and then Firefox itself hangs for about 30 seconds as it handles all that data in the DOM. |
@daxter any thoughts on how to mitigate this problem? |
At this point I'm still not sure, though I'm trying to tackle this and #2542 at the same time, by figuring out how Arbre works. |
I'm having the same issue as @jtomaszewski described and glad that it has already reported :) |
+1 |
Ah, looks like Ruby 2.0 changed the behavior of 1.9.3 :001 > Arbre::Context.new.to_s
=> ""
1.9.3 :002 > Arbre::Context.new.inspect
=> ""
# -------
2.0.0 :001 > Arbre::Context.new.to_s
=> ""
2.0.0 :002 > Arbre::Context.new.inspect
=> "#<Arbre::Context:0x007ff4ba121a40 @_assigns={}, @_helpers=nil, @_current_arbre_element_buffer=[#<Arbre::Context:0x007ff4ba121a40 ...>], @arbre_context=#<Arbre::Context:0x007ff4ba121a40 ...>, @children=[]>" |
I just created a PR for Arbre that solves this problem ⏫ |
@seanlinsley Thanks for the hard work! I'm looking forward to the PR merged. |
Okay, my Arbre PR has been merged so you can now use the latest code from GitHub to get around this problem. |
Ruby 2.0.0-p195
Rails 3.2.13
ActiveAdmin hooked to this GitHub repo rather than a gem version to fix this issue
Brand new ActiveAdmin install; after changing any tiny detail of any resource (e.g. add a column to an index page) I get insane CPU usage and memory use. I have to kill the process and restart my server.
Any ideas?
The text was updated successfully, but these errors were encountered: