I've asked this question over at stackoverflow, but I thought someone here might have insight as well.
I've recently deployed my first Rails application on a Mac mini running Lion 10.7.2 with Apache and Phusion Passenger. It's a quad core machine with 2 gigs of ram on it. The server seems to be fine at first, handling only a handful of requests. However, after the requests start increasing it locks up. This is my first server deployment of ROR and I'm not quit sure what I should be checking. I've looked at the ruby processes running and it has around 5 or 6.
The application is extremely database and AJAX intensive.
I've read through other posts about optimizing Phusion Passenger, but it doesn't seem to help. My httpd.conf file looks like the following:
<VirtualHost *:80>
ServerName http://domain.com/
DocumentRoot /Users/lab/WebApplications/next_browse_app/public
PassengerSpawnMethod conservative
# Speeds up spawn time tremendously -- if your app is compatible.
# RMagick seems to be incompatible with smart spawning
RailsSpawnMethod smart
# Keep the application instances alive longer. Default is 300 (seconds)
PassengerPoolIdleTime 1000
# Keep the spawners alive, which speeds up spawning a new Application
# listener after a period of inactivity at the expense of memory.
RailsAppSpawnerIdleTime 0
# Just in case you're leaking memory, restart a listener
# after processing 5000 requests
PassengerMaxRequests 5000
PassengerMaxPoolSize 4
PassengerMaxInstancesPerApp 4
<Directory /Users/lab/WebApplications/next_browse_app/public>
AllowOverride all
Allow from all
Options -MultiViews
</Directory>
Any help is very much appreciated! Thanks!