How to limit Phusion Passenger memory usage?

joebob picture joebob · Jan 23, 2009 · Viewed 9.1k times · Source

Is there a way to limit the amount of memory Phusion Passenger uses when serving up your app?

My host comes by and kills the process after I get a bunch of traffic and so I end up serving up blank pages. Is there anything I can do to say "hey don't use any more than 100Mb and only spawn 3 processes no matter how overloaded the site is"

Answer

Mihai A picture Mihai A · Jan 24, 2009

There is no way to limit the memory usage explicitly (say use <= 100MiB).

But what you can do is limit the number of processes by setting PassengerMaxPoolSize. Set that and then see how is the memory usage (that depends on the apps you are running).

Also, using Ruby Enterprise Edition may help.