Phusion乘客已越过最大实例限制

时间:2013-01-17 15:03:41

标签: ruby-on-rails ruby apache passenger

我正在将以下内容用于我的rails应用。

ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
Rails 3.0.5
Phusion Passenger version 3.0.5

该应用程序位于4GB RAM的Linux盒子中。我最近将我的rails应用程序从3.0.1升级到3.0.5,用于他们上周发布的关键安全修复程序。

我注意到一件奇怪的事情。我的/etc/apache2/apache2.conf

中有以下乘客设置
PassengerMaxPoolSize 10
PassengerMaxInstancesPerApp 5

但乘客产生了18个机架实例。它只是服务器中的一个应用程序,没有别的。应用程序响应时间变慢。我怀疑额外的机架实例(无处不在)占用了额外的内存。

这是我的free -m输出

             total       used       free     shared    buffers     cached
Mem:          4011       3992         19          0          1         22
-/+ buffers/cache:       3968         43
Swap:         8191       5780       2411

这是我的passenger-status命令输出和passenger-memory-stats输出。

passenger-status

----------- General information -----------
max      = 10
count    = 5
active   = 1
inactive = 4
Waiting on global queue: 0

----------- Application groups -----------
/home/anand/public_html/railsapp/current:
  App root: /home/anand/public_html/railsapp/current
  * PID: 6704    Sessions: 0    Processed: 72      Uptime: 9m 58s
  * PID: 6696    Sessions: 0    Processed: 99      Uptime: 9m 58s
  * PID: 6712    Sessions: 0    Processed: 69      Uptime: 9m 57s
  * PID: 6688    Sessions: 0    Processed: 52      Uptime: 9m 58s
  * PID: 6677    Sessions: 1    Processed: 83      Uptime: 11m 28s

passenger-memory-stats

--------- Apache processes ---------
PID   PPID  VMSize    Private  Name
------------------------------------
6470  1     95.5 MB   0.3 MB   /usr/sbin/apache2 -k start
6471  6470  94.7 MB   0.5 MB   /usr/sbin/apache2 -k start
6488  6470  378.4 MB  4.6 MB   /usr/sbin/apache2 -k start
6489  6470  378.0 MB  3.8 MB   /usr/sbin/apache2 -k start
6774  6470  377.4 MB  3.0 MB   /usr/sbin/apache2 -k start
### Processes: 5
### Total private dirty RSS: 12.20 MB


-------- Nginx processes --------

### Processes: 0
### Total private dirty RSS: 0.00 MB


------ Passenger processes ------
PID    VMSize     Private   Name
---------------------------------
6472   87.1 MB    0.2 MB    PassengerWatchdog
6475   100.9 MB   3.2 MB    PassengerHelperAgent
6477   39.4 MB    4.8 MB    Passenger spawn server
6482   70.7 MB    0.6 MB    PassengerLoggingAgent
6677   289.1 MB   114.3 MB  Rack: /home/anand/public_html/railsapp/current
6684   287.3 MB   17.2 MB   Rack: /home/anand/public_html/railsapp/current
6688   295.6 MB   82.4 MB   Rack: /home/anand/public_html/railsapp/current
6696   299.2 MB   88.9 MB   Rack: /home/anand/public_html/railsapp/current
6704   299.0 MB   87.3 MB   Rack: /home/anand/public_html/railsapp/current
6712   312.6 MB   113.3 MB  Rack: /home/anand/public_html/railsapp/current
23808  1174.7 MB  190.9 MB  Rack: /home/anand/public_html/railsapp/current
26271  1767.0 MB  690.0 MB  Rack: /home/anand/public_html/railsapp/current
28888  1584.7 MB  177.8 MB  Rack: /home/anand/public_html/railsapp/current
32403  1638.5 MB  230.3 MB  Rack: /home/anand/public_html/railsapp/current
32427  1573.6 MB  253.4 MB  Rack: /home/anand/public_html/railsapp/current
32443  1576.0 MB  234.7 MB  Rack: /home/anand/public_html/railsapp/current
### Processes: 16
### Total private dirty RSS: 2289.34 MB

这里出了什么问题? Rails 3.0.5是否会启动额外的机架应用程序。请帮忙。

0 个答案:

没有答案