This project is archived and is in readonly mode.
Memory Leak with Ruby 1.9.2 Rails 3.0 Beta 4
Reported by drjoke | July 4th, 2010 @ 10:24 AM | in 3.0.2
I have tried various combinations and find that by simply generating a skeleton Rails 3.0 application, and then running
siege http://localhost:3000
My ruby process would then leak a few MB every 5 minutes.
The reason I tried this is because I just converted a full blown Rails 2.3 and Ruby Enterprise 1.8.6 application over to Ruby 1.9.2 Rails 3.0 Beta 4 and find that my app is leaking memory.
This happens for both development and production environment, however happens a lot faster in development.
I do not think this is a specific Rails 3.0 problem because I am also experiencing the same with Rails 2.3.5 and Ruby 1.9.2
So it is probably how Ruby 1.9.2 is interacting with Rails.
I never had such problem with Ruby Enterprise 1.8.6.
Comments and changes to this ticket
-
drjoke July 4th, 2010 @ 11:56 AM
Furture info:
I try running the same Rails 3.0 Beta 4 application with Ruby Enterprise 1.8.7 and am not getting this same memory leak.
So Ruby 1.9.2 seems to be the problem, since it is leaking with both Rails 2.3.5 and Rails 3 Beta 4.
-
Rohit Arondekar July 4th, 2010 @ 12:24 PM
- Tag set to memory leak, ruby1.9.2
- Importance changed from to Low
Can you provide some more information like which version of siege, operating system and some kind of log output that shows the memory leak? Also if you ran siege with a particular configuration. It would help those trying to reproduce the problem.
-
drjoke July 4th, 2010 @ 01:51 PM
siege -c 1 http://localhost:3000
And wait one hour. Then wait another. Then wait another.
I use top from command prompt to view memory usage.
With Ruby Enterprise, I do not see any change in memory usage.
But with Ruby 1.9.2 memory keeps increasing. I have tried many Ruby 1.9.2 released in the recent months, including RC1. All had this problem.
I have this problem on Mac 10.6.3 and also Ubuntu 8.10.
All I have to do is
/opt/ruby/1.9.2/rails new example cd example /opt/ruby/1.9.2/rails server
then in another console I do
siege -c 1 http://localhost:3000
This happens in both development and production environment.
Even if I don't do siege, but keep hitting reload constantly on my browser pointing to http://localhost:3000 I will slowly achieve the same result.
Edited by Rohit Arondekar for formating.
-
drjoke July 4th, 2010 @ 01:53 PM
I meant.
/opt/ruby/1.9.2/rails new example cd example
/opt/ruby/1.9.2/rails serverIt should have been obvious though.
-
drjoke July 4th, 2010 @ 01:54 PM
Well "cd example" is on a new line. Not sure why I don't get line break.
-
José Valim July 4th, 2010 @ 01:54 PM
- Milestone cleared.
- Importance changed from Low to High
-
Rohit Arondekar July 4th, 2010 @ 02:01 PM
- State changed from new to open
Moodang, thank you for reporting the issue. :)
P.S fixed formating in your comment, wrapping console commands & code in @@@ is the way to go. Take a look at http://help.lighthouseapp.com/faqs/getting-started/how-do-i-format-... for details.
-
Ryan Bigg July 26th, 2010 @ 02:16 AM
You can also indent it using four spaces, like this:
this is some code
-
Rohit Arondekar July 26th, 2010 @ 06:58 AM
I got this from a comment by Yehuda Katz in the Ruby forum:
This is something we're actively looking into. This is likely a problem in Ruby 1.9, but it may already be resolved (http:// redmine.ruby-lang.org/issues/show/3466#note-3). We're working with Aman Gupta (memprof), and have so far been unable to reproduce this issue. We are actively trying though.
-
José Valim October 15th, 2010 @ 10:47 AM
- State changed from open to stale
Please drop a comment if the leak still exists.
-
Anthony Burns November 5th, 2010 @ 05:56 PM
I'm seeing a leak right now in a Rails 3.0.1 app on 1.9.2-p0. It happens on several views that poll a JSON-rendering action for status. The memory usage steadily climbs while the page is active, and does not release when the page is no longer active.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>