I'm trying to bring down the response time of the first request server by my Rails app (deployed via Apache + Passenger). I went through the Passenger docs and this comment on stackoverflow, and modified various Apache config files (given below). Unfortunately, the first request is still unbearably slow. What am I doing wrong?
/etc/apache2/mods-available/passenger_rvm.load
LoadModule passenger_module /home/nanda/.rvm/gems/ruby-1.9.2-p290@global/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
/etc/apache2/mods-available/passenger_rvm.conf
PassengerRoot /home/nanda/.rvm/gems/ruby-1.9.2-p290@global/gems/passenger-3.0.11
PassengerRuby /home/nanda/.rvm/wrappers/ruby-1.9.2-p290@global/ruby
/etc/apache2/sites-available/beta:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName beta.myapp.com
DocumentRoot /home/nanda/myapp/current/public
<Directory /home/nanda/myapp/current/public>
AllowOverride All
Options -MultiViews
</Directory>
ErrorLog /var/log/apache2/beta.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/beta.access.log combined
# from https://stackoverflow.com/a/853603/534481
PassengerMinInstances 5
</VirtualHost>
PassengerPreStart http://beta.myapp.com/
PassengerPoolIdleTime 0