I have a Rails app on a Windows machine with a SQL Server database, and most of the time (though not always) it runs painfully slow. Strangely, this has only happened since I migrated the app to a newer machine -- when the app ran on an older machine, it worked fine. I'm not familiar with dealing with servery stuff, so what are things I should be looking at to figure out the problem?
I tried looking at the logs, but they seem incorrect. For example, I'm running the app in production mode, so looking at production.log, I see the following for my last request:
Started GET "/experiments" for 197.57.189.98 at 2011-04-07 12:14:40 -0700
Processing by ExperimentsController#index as HTML
Rendered experiments/_experiment_table.html.erb (5.0ms)
Rendered experiments/_experiment_table.html.erb (13.0ms)
Rendered experiments/_experiment_table.html.erb (3.0ms)
Rendered experiments/_experiment_table.html.erb (2.0ms)
Rendered experiments/_experiment_table.html.erb (2.0ms)
Rendered layouts/_header.html.haml (1.0ms)
Rendered experiments/index.html.erb within layouts/application (5410.5ms)
Completed 200 OK in 5671ms (Views: 500.1ms | ActiveRecord: 5162.5ms)
But it actually took 40 seconds from the time I navigated to "/experiments" to the time the page finished loading. (I'm not sure if the log is including database access time, though?)