Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there some sort of mechanism in Phusion Passenger to keep whole applications from going down?

The following is beginning to become a huge problem for us.

We have about 15 Rails applications for our enterprise, running on a massive server. The problem occurs when two or three applications are wildly popular and they start taking up all the instances in the PassengerMaxPoolSize. As soon as that happens, other applications start losing instances, causing several apps to be down completely at any given instant. The mechanism we need is the following:

PassengerMinInstancesPerApp 1

That's it.

BUT, passenger doesn't have this, so we've tried all sorts of variations on PassengerMaxPoolSize, PassengerMaxRequests, PassengerMaxInstancesPerApp, PassengerPoolIdleTime, and PassengerUseGlobalQueue.

Here are the issues with our configuration:

1: PassengerMaxPoolSize is set to about 38...any higher and for some strange reason the other 200 regular http sites start to crawl.

2: PassengerMaxRequests is set to 1000, but for applications that are used only once or twice a week, they still get swamped and killed by other more popular apps

3: PassengerPoolIdleTime is set to 0 because we have no reason to want to shut down applications unnecessarily.

4: PassengerGlobalQueue is on to allow for slightly better load balancing.

5: PassengerMaxInstancesPerApp WAS set, and should have worked, but for some reason it caused a huge lag, similar to the PasengerMaxPoolSize problem...this COULD solve the problem, but it appears to not work...

Unfortunately getting another server is not an option, (one might imagine moving the more popular apps to a separate box).

Anyone know if Phusion is planning to make a PassengerMinInstancesPerApp parameter? Or if they plan to install a mechanism that will prohibit a given application from being completely killed? (Or, if you have any other suggestions, I'm open to possible solutions.

Cheerio! Berns

like image 760
btelles Avatar asked Nov 05 '22 12:11

btelles


1 Answers

Yes. Coming in Passenger 3.

like image 64
Hongli Avatar answered Nov 11 '22 03:11

Hongli