Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm completely new in Rails and I'm facing this problem:

My application runs fine on my development machine when I use script/server (called webrick I guess)

The problem is when I put the application online with mod_rails. It takes forever to start after being idle for a while and in general it feels slower.

I was told to do this on my apache file:

<VirtualHost *:80>
    DocumentRoot /var/www/
    PassengerPoolIdleTime 99999

The problem is I don't find this very elegant and if I don't use my app after a while it does the bootup thing again.


share|improve this question

If this server has a decent amount of resources you should consider leaving the passenger processes running constantly. You can do this by setting the timeouts on a few things to 0.

PassengerPoolIdleTime 0
RailsFrameworkSpawnerIdleTime 0
RailsAppSpawnerIdleTime 0

Also setting more running ruby instances may help with possible load issues

PassengerMaxPoolSize 8

You can find full details on all of the possible apache passenger configuration parameters at the link below. In particular, take a look at PassengerHighPerformance and see if it applies to you. Also take a look at the three different rails spawn methods explained near the bottom. Depending on your application, you may be able to get a decent speed increase by using one of the faster spawners.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.