I’ve noticed this on various pages, both in development mode (which I
do with Mongrel) and in production mode under FastCGI. I’ve seen it on
Mac and on Linux. It’s really bizarre. I’ll pull up a random page,
one that typically takes under a second to return, and it will crawl
for an obscene amount of time. For example, I just pulled up a
straightforward “edit profile page” and the mongrel output is:
Processing GiftaliciousController#edit_profile (for 127.0.0.1 at
2006-10-18 22:07:21) [GET]
Session ID: 761a324c8ef63d038daf53f528ad2445
Parameters: {“action”=>“edit_profile”, “id”=>“tlianza”,
“controller”=>“giftalicious”}
User Load (0.001185) SELECT * FROM users WHERE (users.id = 1) LIMIT
1
User Load (0.001237) SELECT * FROM users WHERE (users.id = 1) LIMIT
1
User Columns (0.074004) SHOW FIELDS FROM users
Rendering giftalicious/edit_profile
Rendered giftalicious/_friend_banner (1.19412)
Rendered giftalicious/_user_form (7.61455)
Rendered giftalicious/_edit_profile (9.66085)
Completed in 106.69851 (0 reqs/sec) | Rendering: 104.38216 (97%) | DB:
0.07728 (0%) | 200 OK
[http://localhost/person/tlianza/section/edit_profile]
A few queries that are directly against a primary key, and a few
partials, and it took 106 seconds to come back, with almost no database
time. Then it seems like, after that point, everything is slow. All
the pages take many seconds to load until I kill and restart the
server.
Occasionally when I kill Mongrel, I get messages about waiting for
threads, and most recently this dumped out after killing mongrel:
% cumulative self self total
time seconds seconds calls ms/call ms/call name
23.00 31.22 31.22 143 218.32 318.67 Kernel.sleep
6.51 40.06 8.84 2158 4.10 45.39 Array#each
6.49 48.87 8.81 98958 0.09 0.09 String#==
3.40 53.48 4.61 427 10.80 16.81 String#scan
1.78 55.90 2.42 51 47.45 780.59
ActionView::Base::CompiledTemplates._run_rhtml_giftalicious__list_item
1.75 58.28 2.38 750 3.17 15.65 Hash#each
1.62 60.48 2.20 15174 0.14 0.20 Hash#[]
1.61 62.67 2.19 14570 0.15 11.46 Kernel.send
1.60 64.84 2.17 2955 0.73 8.34 Class#new
1.50 66.87 2.03 6936 0.29 0.49 Kernel.dup
1.49 68.89 2.02 1091
/usr/local/lib/ruby/1.8/pathname.rb:195: [BUG] Bus Error
Does anyone have any idea what might be going on? How might I begin
troubleshooting this thing?
Thanks!
Tom