乘客使用我所有的RAM内存和我的服务器

时间:2015-02-28 08:17:48

标签: ruby-on-rails passenger

当我重新启动服务器时,一切正常!它加载速度很快。但是每次重新加载页面都会填满我的记忆,最后我的服务器会缩短。

---------- Nginx processes -----------
PID    PPID   VMSize    Private  Name
--------------------------------------
18441  1      137.3 MB  0.2 MB   nginx: master process /usr/sbin/nginx
18442  18441  137.9 MB  0.8 MB   nginx: worker process
18443  18441  137.6 MB  0.5 MB   nginx: worker process
18444  18441  138.0 MB  1.0 MB   nginx: worker process
18445  18441  137.6 MB  0.5 MB   nginx: worker process
### Processes: 5
### Total private dirty RSS: 3.11 MB


----- Passenger processes ------
PID    VMSize    Private   Name
--------------------------------
18423  218.4 MB  0.3 MB    PassengerWatchdog
18431  234.9 MB  1.1 MB    PassengerLoggingAgent
19080  567.8 MB  0.9 MB    PassengerHelperAgent
19093  461.7 MB  59.7 MB   Passenger AppPreloader: /home/rails/myapp
19108  398.6 MB  101.6 MB  Passenger RackApp: /home/rails/myapp
19160  395.7 MB  76.1 MB   Passenger RackApp: /home/rails/myapp
19168  397.8 MB  99.5 MB   Passenger RackApp: /home/rails/myapp
### Processes: 7
### Total private dirty RSS: 339.29 MB



             total       used       free     shared    buffers     cached
Mem:           490        437         52          0         12         56

1 个答案:

答案 0 :(得分:1)

您应指定乘客工人的最大数量:

passenger_min_instances 2;
passenger_max_pool_size 4;

为这些变量设置适当的值。 Here您可以找到更多详细信息。