My mongrels slowly grow as my application runs, and I have to restart them every few days (not as bad as some, I know). I used bleak_house and had the following conversation with Evan: http://rubyforge.org/forum/forum.php?thread_id=24104&forum_id=13983 Essentially, it looks like I have no leaks, but Evan suggested that I may be suffering from heap fragmentation. I have found a theoretical method to overcome this here... http://www.brpreiss.com/books/opus8/html/page428.html ...but am not sure how it can be implemented. Does anybody have any suggestions or experience dealing with overcoming heap fragmentation? Perhaps something else could be causing the memory growth that I should look into? I''m glad that my app doesn''t have memory leaks, but I''m not sure what to do to keep the mongrels from steadily growing until I run out of RAM... Thanks! -Kyle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Does anybody think that Passenger/mod_rails might help? I''d just give it a try, but the app is already in production, and I''d hate to reconfigure it and take it down for nothing... -Kyle On May 7, 12:32 pm, Kyle <kyle.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> My mongrels slowly grow as my application runs, and I have to restart > them every few days (not as bad as some, I know). I used bleak_house > and had the following conversation with Evan: > > http://rubyforge.org/forum/forum.php?thread_id=24104&forum_id=13983 > > Essentially, it looks like I have no leaks, but Evan suggested that I > may be suffering from heap fragmentation. I have found a theoretical > method to overcome this here... > > http://www.brpreiss.com/books/opus8/html/page428.html > > ...but am not sure how it can be implemented. > > Does anybody have any suggestions or experience dealing with > overcoming heap fragmentation? Perhaps something else could be > causing the memory growth that I should look into? I''m glad that my > app doesn''t have memory leaks, but I''m not sure what to do to keep the > mongrels from steadily growing until I run out of RAM... > > Thanks! > > -Kyle--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Kyle wrote the following on 07.05.2008 19:32 :> My mongrels slowly grow as my application runs, and I have to restart > them every few days (not as bad as some, I know). I used bleak_house > and had the following conversation with Evan: > > http://rubyforge.org/forum/forum.php?thread_id=24104&forum_id=13983 > > Essentially, it looks like I have no leaks, but Evan suggested that I > may be suffering from heap fragmentation. I have found a theoretical > method to overcome this here... > > http://www.brpreiss.com/books/opus8/html/page428.html > > ...but am not sure how it can be implemented. > > Does anybody have any suggestions or experience dealing with > overcoming heap fragmentation? Perhaps something else could be > causing the memory growth that I should look into? I''m glad that my > app doesn''t have memory leaks, but I''m not sure what to do to keep the > mongrels from steadily growing until I run out of RAM... >Some ideas : I use seesaw (http://rubyforge.org/projects/rails-oceania) to restart mongrels without impacting the users. I don''t use it for saving memory (although at a point I did) but to restart mongrels after log rotation. I had some pages that accessed a lot of ActiveRecord objects and used too much memory, I rewrote some code to get at the info I needed without creating as much model instances, it helped a lot. One of the selling points of Jruby for me is that it is supposed to use less memory than MRI. You might want to test it. I don''t think passenger will save you much. It removes a lot of memory usage associated with the initial Rails and Ruby loading but not with the actual "run" where your problem is. They have a tuned MRI in the works that would certainly help there tough. Lionel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you for the suggestions! I''ll work on my code and check out Jruby. -Kyle On May 12, 7:53 am, Lionel Bouton <lionel-subscript...-WTamNBQcZIx7tPAFqOLdPg@public.gmane.org> wrote:> Kyle wrote the following on 07.05.2008 19:32 : > > > > > My mongrels slowly grow as my application runs, and I have to restart > > them every few days (not as bad as some, I know). I used bleak_house > > and had the following conversation with Evan: > > >http://rubyforge.org/forum/forum.php?thread_id=24104&forum_id=13983 > > > Essentially, it looks like I have no leaks, but Evan suggested that I > > may be suffering from heap fragmentation. I have found a theoretical > > method to overcome this here... > > >http://www.brpreiss.com/books/opus8/html/page428.html > > > ...but am not sure how it can be implemented. > > > Does anybody have any suggestions or experience dealing with > > overcoming heap fragmentation? Perhaps something else could be > > causing the memory growth that I should look into? I''m glad that my > > app doesn''t have memory leaks, but I''m not sure what to do to keep the > > mongrels from steadily growing until I run out of RAM... > > Some ideas : > > I use seesaw (http://rubyforge.org/projects/rails-oceania) to restart > mongrels without impacting the users. I don''t use it for saving memory > (although at a point I did) but to restart mongrels after log rotation. > > I had some pages that accessed a lot of ActiveRecord objects and used > too much memory, I rewrote some code to get at the info I needed without > creating as much model instances, it helped a lot. > > One of the selling points of Jruby for me is that it is supposed to use > less memory than MRI. You might want to test it. > > I don''t think passenger will save you much. It removes a lot of memory > usage associated with the initial Rails and Ruby loading but not with > the actual "run" where your problem is. They have a tuned MRI in the > works that would certainly help there tough. > > Lionel--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---