What I Learned Today

Today was my last day on a grueling project, and I optimized the heck out of it. One of the neatest things I learned about is a feature in Phusion Passenger. PassengerPoolIdleTime has always been a configuration option in Passenger to set how long a Passenger instance should hang around after the last request it's served. After that time, it shuts down. This is great for resources, but not great if your app is used irregularly and takes a long time to start.

PassengerPoolIdleTime 0 changes that:

When this value is set to 0, application instances will not be shutdown unless it’s really necessary, i.e. when Phusion Passenger is out of worker processes for a given application and one of the inactive application instances needs to make place for another application instance. Setting the value to 0 is recommended if you’re on a non-shared host that’s only running a few applications, each which must be available at all times.

Man, I'd been waiting for that for so long. When did that get in Passenger?

If you're worried about the memory leakage that'll come with your funky Rails app (ahem, image processing), check out PassengerMaxRequests.

Published: 24 Apr 2009