Reputation: 856
I have a Ubuntu server(11.10) and use mod_passenger for Redmine. It works pretty well, but somehow slow on first run (once in a while).
I've googled and came up into this: http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMinInstances
However I can't setup any of the specified options. They just don't work. I've tried in:
Wherever I put a command like 'PassengerMinInstances 3' and try to reload Apache I get:
Syntax error on line 9 of /etc/apache2/sites-enabled/redmine:
Invalid command 'PassengerMinInstances', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
Ofcourse the lines and files differ. Logs don't hold anything related.
Upvotes: 3
Views: 7808
Reputation: 55833
Ubuntu ships with an older Passenger version that not yet supports the PassengerMinInstances
option.
As an alternative you could set PassengerPoolIdleTime
and PassengerMaxRequests
to a rather high value to prevent idle instances to be recycled.
You could also use the Ubuntu package provided by Phusion. See http://wiki.brightbox.co.uk/docs:phusion-passenger for more information about that
Finally, you could also install the current version of Passenger using rubygems. For that remove the libapache2-mod-passenger
package and run this:
sudo aptitude purge libapache2-mod-passenger
sudo apt-get install rubygems build-essential apache2-prefork-dev libapr1-dev libssl-dev zlib1g-dev
sudo gem install passenger
sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module
It will compile and install passenger. At the end, it will output some configuration values that you need to put in /etc/apache2/mods-available/passenger.load
.
Then enable passenger by running
sudo a2enmod passenger
sudo /etc/init.d/apache2 restart
and everything should be well.
Upvotes: 8
Reputation: 331
Are you placing it in the same file in which you are loading the Passenger module? E.g. are you placing those lines underneath a line that looks something like the following?
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p180@rails31/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
Upvotes: 0