This is normal. The Rails application has to be started at some point,
and that point happens to be the first request.
If you don't want this, then you can write a little script which visits
your website. This script is to be run immediately after you've started
Apache. Like this:
wget -O /dev/null http://localhost/ 2>/dev/null
It'll force Apache to start the Rails app.
You may also be interested in the "RailsPoolIdleTime" option, as
described in the users guide.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
That's normal. But as I've said, you're probably interested in the
"RailsPoolIdleTime" option, as described in the users guide. By
increasing it to an insane number (99999999 or something) the Rails
processes will be kept alive forever.
> And if so, does this mean
> that the entire Rails framework is loaded for each new request/session/
> user that hits the site ?
No. The behavior is actually a little more complex than that because
there's a lot of caching involved in order to decrease startup time.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Yes and yes.
--
Phusion | The Computer Science Company
Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
I'm getting that "feature" thanks to my monitoring system poking the
sites each minute to ensure that I have one instance alive at all times.
However, it'd be nice if there was a way to specify this in the
configurations on a per-application basis, e.g.,:
<VirtualHost...
# Minimum instances of this app. Defaults to 0 where all instances
can be shut down.
PassengerMinInstances 1
# Maximum instances of this app. Defaults to 0 where limit is equal
to PassengerMaxPoolSize.
PassengerMaxInstances 4
Thanks again for the good work.
-igal
+1
And thanks for passenger, it is great.
Mikel
--
http://lindsaar.net/
Rails, RSpec and Life blog....
For each application root, there is only a single instance of the
application spawner server, so there will never be a situation with 30
application spawner server instances. It effectively behaves as a single
"always on" instance, with the added benefit of being able to quickly
spawn many more instances when necessary.
No, they're independent. The default spawn method in the development
version is "smart-lv2", which skips the framework spawner, so setting
the framework spawner timeout wouldn't have effect anyway unless you
explicitly set the spawn method to "smart".
> Will the app idle time keep the framework spawner alive?
No, they're independent.
> After a few:
> Invalid command 'RailsAppSpawnerIdleTime', perhaps misspelled or
> defined by a module not included in the server configuration
> websrvmng: Service /etc/init.d/httpd failed to gracefully restart
>
> I realized that the variable wasn't in the 2.0.3 release. I'm looking
> forward to this. Thanks - passenger has solved _so_ many problems!
It's safe to run the development version. A number of production servers
are running on it.