how to increase the time-out

I have a Rails 2 app that doesn't get a lot of traffic. It's running under Passenger and Apache 2.2, and when it's running, it has great performance, page loads are very snappy, etc. But the first hit on the site after the server has gone to sleep takes a good while to load, right on the edge of "hmmm, server isn't responding...".

Is there something I can do, short of a cron job to request the home page every couple of minutes, to keep this spin-down from happening?

Thanks,

Walter

I would install NewRelic or equiv to see where the time's being spent.

My guess would be a DB pool connection timeout; re-establishing the
first connection is fairly time-consuming.

HTH!

Walter Lee Davis wrote:

I have a Rails 2 app that doesn’t get a lot of traffic.
It’s running under Passenger and Apache 2.2, and when it’s running, it
has great performance, page loads are very snappy, etc. But the first
hit on the site after the server has gone to sleep takes a good while
to load, right on the edge of “hmmm, server isn’t responding…”.

Is there something I can do, short of a cron job to request the home
page every couple of minutes, to keep this spin-down from happening?

Thanks,

Walter

Take a look
at the passenger documentation. After a configurable idle period the
rails process is terminated and must be reloaded. The length of the
idle period can be set to whatever works for you. There are some other
things that can be similarly changed that will impact this.

Norm

Passenger 3 will have MinInstances option so you could say that you
always want at least 1 instance ready to serve next request.

Robert Pankowecki