Hi everybody,
I am running a rails application on a Linode 768
Looking at some documentation I've seen that PassengerMaxPoolSize=3 should be enough for a 512mb ram vps, however I am running out of memory and I have limited this value to PassengerMaxPoolSize=3
looking at the output of my ps aux every rails application in the pool is consuming 15% of my total memory, is this normal? How could I reduce this value?
thank you for your help
Code:
ps aux | grep www-data
www-data 367 0.0 0.7 36156 5640 ? S 10:11 0:00 /usr/sbin/apache2 -k start
www-data 370 0.0 0.7 36172 5528 ? S 10:11 0:00 /usr/sbin/apache2 -k start
www-data 371 0.0 0.7 36308 5532 ? S 10:11 0:00 /usr/sbin/apache2 -k start
www-data 377 2.0 15.6 132716 120032 ? Sl 10:12 2:06 Rack: /srv/www/myapplication.it/application
www-data 380 0.0 0.7 36156 5520 ? S 10:12 0:00 /usr/sbin/apache2 -k start
www-data 382 0.0 0.7 36308 5536 ? S 10:12 0:00 /usr/sbin/apache2 -k start
www-data 384 0.0 0.6 35780 5252 ? S 10:12 0:00 /usr/sbin/apache2 -k start
www-data 394 2.0 15.6 133180 120488 ? Sl 10:12 2:08 Rack: /srv/www/myapplication.it/application
www-data 406 2.4 15.3 130764 118060 ? Sl 10:12 2:31 Rack: /srv/www/myapplication.it/application
www-data 414 0.0 0.7 36332 5676 ? S 10:12 0:00 /usr/sbin/apache2 -k start
www-data 415 0.0 0.7 36156 5432 ? S 10:12 0:00 /usr/sbin/apache2 -k start
www-data 420 0.0 0.7 36308 5564 ? S 10:12 0:00 /usr/sbin/apache2 -k start
www-data 421 0.0 0.7 36156 5640 ? S 10:12 0:00 /usr/sbin/apache2 -k start
1000 2510 0.0 0.0 3380 752 pts/1 S+ 11:54 0:00 grep --color=auto www-data
this is my prefork module setup
Code:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
[b] MaxClients 20[/b]
ServerLimit 20
MaxRequestsPerChild 0
</IfModule>
this is my passenger setup
Code:
RailsSpawnMethod smart
[b]PassengerMaxPoolSize 3[/b]
PassengerPoolIdleTime 0
RailsAppSpawnerIdleTime 0
PassengerMaxRequests 5000
The result of free -m after hitting the site for a while, it started with 150mb of free memory and it went down until it reaches 47mb
Code:
total used free shared buffers cached
Mem: 750 703 47 0 30 266
-/+ buffers/cache: 406 344
Swap: 255 5 250