Maaaark
Maaaark

Reputation: 239

Passenger is wasting Memory

yesterday I installed Passenger for Apache. Everything went fine but the "idle" time between click and rendering the page is about 4-5 sek. The rendering itself is very fast but the time between is the problem.

Also passenger is using too much memory.

------ Passenger processes -------  
PID    VMSize     Private    Name  
----------------------------------
3737   398.3 MB   313.9 MB   Rack: /home/www/web6/html/beta
24389  94.3 MB    29.7 MB    Passenger ApplicationSpawner: /home/www/web6/html/beta
26074  15.0 MB    0.2 MB     PassengerWatchdog
26078  26.1 MB    0.6 MB     PassengerHelperAgent
26083  46.5 MB    8.7 MB     Passenger spawn server
26092  65.7 MB    0.7 MB     PassengerLoggingAgent
28453  1199.5 MB  1114.5 MB  Rack: /home/www/web6/html/beta
### Processes: 7
### Total private dirty RSS: 1468.28 MB

Even this is way too hight but after a few clicks:

------ Passenger processes -------
    PID    VMSize     Private    Name
----------------------------------
3737   412.0 MB   327.5 MB   Rack: /home/www/web6/html/beta
26074  15.0 MB    0.2 MB     PassengerWatchdog
26078  26.1 MB    0.6 MB     PassengerHelperAgent
26083  46.5 MB    8.8 MB     Passenger spawn server
26092  65.7 MB    0.7 MB     PassengerLoggingAgent
26294  1207.6 MB  1125.8 MB  Rack: /home/www/web6/html/beta
28453  1246.5 MB  1161.9 MB  Rack: /home/www/web6/html/beta
### Processes: 7
### Total private dirty RSS: 2625.56 MB

After if set this to my apache2.conf:

PassengerMaxPoolSize 5
PassengerPoolIdleTime 0

it was a little bit faster but the memory problem is still there.

My Server got:

2GB RAM and 2 more Shared and also 2 CPU.

Is the Problem in my Rails App or is there something i messed up at Passenger?

Thanks for your help!

Upvotes: 2

Views: 1399

Answers (1)

Maaaark
Maaaark

Reputation: 239

Okay the solution is simple. Forget to switch to production env.

Development Mode is stacking the memory and doesn't use cache.

Upvotes: 1

Related Questions