Taylor Williams
Taylor Williams

Reputation: 356

Linux Apache Server Running Phusion Passenger and 2 Apps has 8 ruby processes?

I'm trying to resolve some memory issues on my Linux (Ubuntu) Apache server which runs Phusion Passenger and 2 Rails apps successfully.

Everytime I kill all the ruby processes or restart the server, I keep getting 8 Ruby processes running all using 10% (100mb) of my system's RAM.

When I disable one of the apps, my processes go down to 7, and if I disable all my apps, I get 6 processes...

Surly I shouldn't be getting so many processes from running two applications... or even 0 applications?

Am I missing something, is this normal?

Heres a screenshot of my processes when all apps are running... the PPID is the parent process... (3396 is PassengerHelper) Heres a screenshot of my processes when all apps are running... the PPID is the parent process...

Upvotes: 0

Views: 362

Answers (1)

Taylor Williams
Taylor Williams

Reputation: 356

With thanks to Frederick Cheung, I did some research: https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerMaxPoolSize

8.6.1. PassengerMaxPoolSize

The maximum number of application processes that may simultaneously exist. A larger number results in higher memory usage, but improves the ability to handle concurrent HTTP requests. The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article Tuning Phusion Passenger’s concurrency settings.

If you find that your server is running out of memory then you should lower this value.

This option may only occur once, in the global server configuration. The default value is 6.

I set PassengerMaxPoolSize to 2 in all my virtual host files, and resolved the issue!

Upvotes: 1

Related Questions