You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm profiling a Rails 3.2 app on Ruby 1.9.3 which has the following filter in ApplicationController to reduce the frequency of GC runs:
@@last_gc_run = Time.now
around_filter do |c, &action|
GC.disable
rv = action.call()
if Time.now - @@last_gc_run > 1.0
GC.enable
GC.start
@@last_gc_run = Time.now
end
rv
end
Ordinarily, this makes things about 30% faster. If I hit http://mysite/controller/action, it runs as expected, only taking a few seconds... but if I hit http://mysite/controller/action?profile=1, it causes the Ruby process to spin up to 100% CPU usage and run forever. Doesn't respond to signals, needs to be SIGKILLed. Removing this around_filter makes ?profile=1 requests work normally again.
My configuration is { :default_printer => :text, :mode => :walltime }, although the bug seems to occur no matter which printer I use.
The text was updated successfully, but these errors were encountered:
So I'm profiling a Rails 3.2 app on Ruby 1.9.3 which has the following filter in ApplicationController to reduce the frequency of GC runs:
Ordinarily, this makes things about 30% faster. If I hit
http://mysite/controller/action
, it runs as expected, only taking a few seconds... but if I hithttp://mysite/controller/action?profile=1
, it causes the Ruby process to spin up to 100% CPU usage and run forever. Doesn't respond to signals, needs to be SIGKILLed. Removing this around_filter makes?profile=1
requests work normally again.My configuration is
{ :default_printer => :text, :mode => :walltime }
, although the bug seems to occur no matter which printer I use.The text was updated successfully, but these errors were encountered: