5

I'm suddenly experiencing that rake and rails sort of bail out with some strange output. It most of all looks like a process list but it's clearly Ruby/Rails related. Also, it's several pages long - I actually had to increase the scrollback setting in my terminal to get to see what was going on before this output started.

Here's a short excerpt:

0.00    48.12      0.00        1     0.00     0.00  Rails::Rack::LogTailer#tail!
0.00    48.12      0.00        3     0.00     0.00  WEBrick::HTTPResponse#[]
0.00    48.12      0.00        1     0.00     0.00  Rack::Utils::HeaderHash#each
0.00    48.12      0.00        2     0.00     0.00  Range#begin
0.00    48.12      0.00        1     0.00     0.00  Range#end
0.00    48.12      0.00        1     0.00    10.00  Rack::File#each
0.00    48.12      0.00        1     0.00     0.00  WEBrick::HTTPRequest#fixup
0.00    48.12      0.00        1     0.00     0.00  Kernel.raise
0.00    48.12      0.00        1     0.00     0.00  Exception#to_s
0.00    48.12      0.00        1     0.00     0.00  WEBrick::GenericServer#stop
0.00    48.12      0.00        1     0.00     0.00  WEBrick::BasicLog#debug?

This particular output came after I killed WebRick (ctrl+c). I also experience this when running tests (it seems to show up after each test/file) and when running rake db:migrate (shows up when migration is done).

I'm currently running Rails 3.1.0 (upgraded from 3.0.5 hoping that would solve this) and ruby 1.9.2p180 installed through RVM.

Any ideas why this is happening?

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
fiskeben
  • 3,395
  • 4
  • 31
  • 35
  • Almost looks like some sort of profiling or benchmarking output. No idea what could do that, but perhaps that can give you some ideas on where to look. Maybe you enable some sort of profiling somewhere.. – Casper Sep 06 '11 at 00:36
  • 2
    See here. Looks like similar output: http://stackoverflow.com/questions/350470/what-tools-do-you-recommend-to-profile-rails-apps – Casper Sep 06 '11 at 00:37
  • You're right! It looks exactly like profiling output. Now it remains to find out where it comes from... – fiskeben Sep 06 '11 at 05:13
  • I found out. I had a model called Profile which was loaded by an initializer. Since I deleted the Profile model, rails obviously loads some other Profile class from somewhere. – fiskeben Sep 07 '11 at 20:46
  • 8
    How about writing a simple answer, and marking that as the right one? The question is currently marked as open (which it is no more). – mliebelt Sep 09 '11 at 20:20

1 Answers1

1

You had a model named Profile, when you removed that Rails attempted to load it, though as that file no longer existed it would have looked elsewhere in the load path and got the profiler out of the standard libraries. Thus what you are seeing is your application being profiled (accidentally).

thomasfedb
  • 5,990
  • 2
  • 37
  • 65