How to improve Nginx, Rails, Passenger memory usage? -


i have rails app set on digital ocean vps (1gb ram) trough cloud 66. problem being vps' memory runs full passenger processes.

the output of passenger-status:

# passenger-status version : 4.0.45 date    : 2014-09-23 09:04:37 +0000 instance: 1762 ----------- general information ----------- max pool size : 2 processes     : 2 requests in top-level queue : 0  ----------- application groups ----------- /var/deploy/cityspotters/web_head/current#default:   app root: /var/deploy/cityspotters/web_head/current   requests in queue: 0   * pid: 7675    sessions: 0       processed: 599     uptime: 39m 35s     cpu: 1%      memory  : 151m    last used: 1m 10s ago   * pid: 7686    sessions: 0       processed: 477     uptime: 39m 34s     cpu: 1%      memory  : 115m    last used: 10s ago 

the max_pool_size seems configured correctly.

the output of passenger-memory-stats:

# passenger-memory-stats version: 4.0.45 date   : 2014-09-23 09:10:41 +0000 ------------- apache processes ------------- *** warning: apache executable cannot found. please set apxs2 environment variable 'apxs2' executable's filename, or set httpd environment variable 'httpd' or 'apache2' executable's filename.   --------- nginx processes --------- pid   ppid  vmsize   private  name ----------------------------------- 1762  1     51.8 mb  0.4 mb   nginx: master process /opt/nginx/sbin/nginx 7616  1762  53.0 mb  1.8 mb   nginx: worker process ### processes: 2 ### total private dirty rss: 2.22 mb   ----- passenger processes ----- pid   vmsize    private   name ------------------------------- 7597  218.3 mb  0.3 mb    passengerwatchdog 7600  565.7 mb  1.1 mb    passengerhelperagent 7606  230.8 mb  1.0 mb    passengerloggingagent 7675  652.0 mb  151.7 mb  passenger rackapp: /var/deploy/cityspotters/web_head/current 7686  652.1 mb  116.7 mb  passenger rackapp: /var/deploy/cityspotters/web_head/current ### processes: 5 ### total private dirty rss: 270.82 mb 

.. 2 passenger rackapp processes, ok.

but when use htop command, output follows:

htop output

there seem lot of passenger rackup processes. we're running sidekiq default configuration.

new relic server reports following memory usage:

new relic server monitoring output

i tried tuning passenger settings, adding load balancer , server don't know here. how can find out what's causing memory usage?

update: had restart ngnix because of changes , seemed free quite lot of memory.

press h hide threads in htop. aren't processes threads within process. key column rss: have 2 passenger processes @ 209mb , 215mb , 1 sidekiq process @ 154mb.

short answer: normal memory usage rails app. 1gb little small if want multiple processes each. i'd cut down passenger 1 process.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -