This project is archived and is in readonly mode.
Memory problem on reset_session in around_filter
Reported by tmtysk | December 11th, 2008 @ 09:08 AM
On rails-2.x. Memory usage would be increased and not be deallocated that on 'reset_session' in 'around_filter'.
For example, requesting so much to http://localhost:3000/foo/ using following controller on 'production' environment. Then, after all response, instances of CGI::Session or CgiRequest are deallocated from ObjectSpace, but, lots of instances of String (include session_id) will not be targeted by GC. However, using before/after filter, this problem is not occured.
class FooController < ApplicationController
around_filter :bar
def index
end
protected
def bar
reset_session
yield
end
end
thanks.
Comments and changes to this ticket
-
Michael Koziarski December 11th, 2008 @ 11:46 AM
- Assigned user set to josh
- Milestone cleared.
We'll need a fix for this in 2-2-stable as well as edge.
-
Nick Sieger December 11th, 2008 @ 03:15 PM
FYI, JRuby doesn't appear to exhibit this memory leak. See http://skitch.com/nicksieger/68y... for a heap trace during a couple thousand requests against the above controller on JRuby.
-
Repository December 11th, 2008 @ 05:07 PM
- State changed from new to resolved
(from [5ede4ce188d29aef94af78f27d89169ac4ee54cd]) Fixed session related memory leak [#1558 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
Jeremy Kemper December 12th, 2008 @ 12:49 AM
- State changed from resolved to open
It wasn't committed to 2-2-stable or 2-1-stable.
-
Repository December 15th, 2008 @ 05:52 PM
- State changed from open to resolved
(from [bf0a8eb777ef7f796333b579329c5556f0bacc46]) Fixed session related memory leak [#1558 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
Repository December 15th, 2008 @ 05:53 PM
(from [d0a3dbf5aa3d9105364556c9ec5847ab3ecacaf8]) Fixed session related memory leak [#1558 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
-
Stephen Bannasch December 27th, 2008 @ 04:07 PM
reverted on the 16th by Josh:
http://github.com/rails/rails/co...
No comment in the commit about why it was reverted.
I was looking at this because of the use of ObjectSpace which is normally disabled for performance reasons in JRuby.
-
Frederick Cheung December 27th, 2008 @ 04:13 PM
Because this was only necessary due to finalizer related oddities in CGI::Session, edge no longer uses CGI::Session at all
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>
People watching this ticket
Attachments
Referenced by
- 1558 Memory problem on reset_session in around_filter (from [5ede4ce188d29aef94af78f27d89169ac4ee54cd]) Fixed s...
- 1558 Memory problem on reset_session in around_filter (from [bf0a8eb777ef7f796333b579329c5556f0bacc46]) Fixed s...
- 1558 Memory problem on reset_session in around_filter (from [d0a3dbf5aa3d9105364556c9ec5847ab3ecacaf8]) Fixed s...