Total green-horn here. A few weeks ago, a test website we were bulding
(on
freebsd with mysql) slowed waaaay down.
I believe I have the problem narrowed down to this line of code in
/vendor/rails/railties/lib/initializer.rb:
configuration.frameworks.each { |framework| require(framework.to_s) }
I Say I think I’ve got it narrowed doen to this line of code, because I
have
it flanked by puts “AAA” and puts “BBB”, and whenever I execute:
config/environment.rb
there is a ~6 second pause between AAA and BBB to STDOUT.
Like I’ve said (and I’m sure you would have realized by now), I am a
total
greenhorn here, but:
Is this pause to be expected, or have I stumbled upon the issue?
What does this line (configuration.frameworks.each { |framework|
require(framework.to_s) }) mean? Can someone point me to the next
file/line
to look?
On Sat, Apr 21, 2007 at 03:56:38PM +0900, Guy S. wrote:
I believe I have the problem narrowed down to this line of code in
/vendor/rails/railties/lib/initializer.rb:
configuration.frameworks.each { |framework| require(framework.to_s) }
I Say I think I’ve got it narrowed doen to this line of code, because I
have it flanked by puts “AAA” and puts “BBB”, and whenever I execute:
config/environment.rb
there is a ~6 second pause between AAA and BBB to STDOUT.
Rails does indeed have a long startup time. But normally it doesn’t
matter,
because the same instance should remain around to handle subsequent
requests.
So it sounds like you’ve broken something else, such that either Rails
can’t
start at all, or it starts, handles one (or a few) requests, and then
terminates.
Debugging this would depend on exactly how you’re running rails, e.g.
under
fastcgi, or under mongrel, or webrick. I suggest you go to the Rails
google
group for advice, since this is the Ruby Language list, not the Rails
group.
Regards,
Brian.
P.S. Don’t run rails as a normal CGI. This will guarantee a 6-second
startup overhead for every page request.
Can you tell me (or point me to a faq) what the difference between rails
&
ruby is? Also, I think this is running fastcgi, but how would I know
for
sure?