0

Rails アプリをホストするために Apache と Passenger を実行しています。ハードリブートを頻繁に行う必要がありました。この乗客のメモリ統計を見たとき。Rails アプリに誤解を招く構成があるかどうかを知る必要があります。どのような可能性

アパッチ構成:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/mywebapp/public
    RailsEnv production

    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel warn
    ErrorLog ${APACHE_LOG_DIR}/error.mywebapp.log
    CustomLog ${APACHE_LOG_DIR}/access.mywebapp.log combined
</VirtualHost>

ログ:

➜  ~  passenger-memory-stats 
Version: 4.0.17
Date   : Wed Oct 30 15:04:58 +0100 2013

--------- Apache processes ---------
PID    PPID  VMSize   Private  Name
------------------------------------
1202   1     85.3 MB  0.0 MB   /usr/sbin/apache2 -k start
6894   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
6992   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7006   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7010   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7096   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7104   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7111   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7244   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7318   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7489   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7494   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7651   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7654   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7704   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7709   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
7916   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8001   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8015   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8032   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8393   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8412   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8418   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8419   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
8988   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9011   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9054   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9061   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9144   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9740   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9800   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9825   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
9830   1202  85.6 MB  ?        /usr/sbin/apache2 -k start
11136  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
11787  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
11788  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
11949  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
12255  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
12578  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
12964  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
13105  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
13131  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
13145  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
13151  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
13152  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
13162  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
13388  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
13404  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14099  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14102  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14115  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14135  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14146  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14157  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14167  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14195  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14223  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14313  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14432  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14434  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14512  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14610  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14611  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14612  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
14743  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
14786  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15245  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15258  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15273  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15278  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15285  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15361  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15372  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15441  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15442  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
15458  1202  85.6 MB  ?        /usr/sbin/apache2 -k start
16395  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
16466  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
16475  1202  85.4 MB  ?        /usr/sbin/apache2 -k start
### Processes: 79
### Total private dirty RSS: 0.03 MB (?)


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

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


---- Passenger processes -----
PID   VMSize    Private  Name
------------------------------
1204  216.2 MB  0.0 MB   PassengerWatchdog
1207  564.2 MB  0.2 MB   PassengerHelperAgent
1215  230.0 MB  0.0 MB   PassengerLoggingAgent
6924  316.8 MB  28.2 MB  Passenger RackApp: /var/www/mywebapp
6928  316.6 MB  26.0 MB  Passenger RackApp: /var/www/mywebapp
6934  317.3 MB  42.6 MB  Passenger RackApp: /var/www/mywebapp
7079  316.3 MB  46.0 MB  Passenger RackApp: /var/www/mywebapp
7083  317.4 MB  31.7 MB  Passenger RackApp: /var/www/mywebapp
7093  319.6 MB  41.1 MB  Passenger RackApp: /var/www/mywebapp
### Processes: 9
### Total private dirty RSS: 215.79 MB
➜  ~  passanger-status
zsh: command not found: passanger-status
➜  ~  passenger-status 
Version : 4.0.17
Date    : Wed Oct 30 15:06:23 +0100 2013
Instance: 1202
----------- General information -----------
Max pool size : 6
Processes     : 6
Requests in top-level queue : 0

----------- Application groups -----------
/var/www/mywebapp#default:
  App root: /var/www/mywebapp
  Requests in queue: 63
  * PID: 6924    Sessions: 1       Processed: 56      Uptime: 6h 15m 19s
    CPU: 3%      Memory  : 110M    Last used: 2m 49s a
  * PID: 6928    Sessions: 1       Processed: 54      Uptime: 6h 15m 19s
    CPU: 3%      Memory  : 110M    Last used: 7m 43s a
  * PID: 6934    Sessions: 1       Processed: 62      Uptime: 6h 15m 18s
    CPU: 3%      Memory  : 111M    Last used: 51s ago
  * PID: 7079    Sessions: 1       Processed: 76      Uptime: 6h 12m 9s
    CPU: 3%      Memory  : 110M    Last used: 4m 42s ag
  * PID: 7083    Sessions: 1       Processed: 51      Uptime: 6h 12m 8s
    CPU: 3%      Memory  : 112M    Last used: 7m 49s ag
  * PID: 7093    Sessions: 1       Processed: 57      Uptime: 6h 12m 6s
    CPU: 3%      Memory  : 114M    Last used: 4m 21s ag
4

0 に答える 0