Apache 上的 Passenger 挂起,占用所有应用程序进程,并且 CPU IO 等待率非常高

Apache 上的 Passenger 挂起,占用所有应用程序进程,并且 CPU IO 等待率非常高

我在 Apache/Passenger 下的服务器上运行一组 rails 应用程序。其中一个应用程序一直处于这样一种状态:机器上的负载变得非常高,机器变得没有响应,top 显示大多数 CPU 时间都花在了 IO 等待上,但没有一个进程占用了太多时间。iowait 和 ifwait 没有显示任何异常。passenger-status 是最有趣的,它显示了我怀疑是问题应用程序(下面输出中的应用程序 x)的每个应用程序进程都被 1 个会话占用。我可以终止所有这些进程,然后让 Passenger 替换它们,而不会对服务器负载产生影响,只有当我重新启动 apache 或服务器负载恢复正常时才会产生影响。输出如下:

----------- General information -----------
max      = 20
count    = 20
active   = 16
inactive = 4
Waiting on global queue: 22

----------- Application groups -----------
/home/A:
  App root: /home/A
  * PID: 5379    Sessions: 0    Processed: 6       Uptime: 3m 42s

/home/X:
  App root: /home/X
  * PID: 5604    Sessions: 1    Processed: 2       Uptime: 1m 8s
  * PID: 5560    Sessions: 1    Processed: 3       Uptime: 1m 10s
  * PID: 5416    Sessions: 1    Processed: 5       Uptime: 3m 30s
  * PID: 5387    Sessions: 1    Processed: 19      Uptime: 3m 30s
  * PID: 5571    Sessions: 1    Processed: 2       Uptime: 1m 9s
  * PID: 5408    Sessions: 1    Processed: 6       Uptime: 3m 30s
  * PID: 5424    Sessions: 1    Processed: 3       Uptime: 3m 30s
  * PID: 5306    Sessions: 1    Processed: 18      Uptime: 3m 30s
  * PID: 5553    Sessions: 1    Processed: 1       Uptime: 1m 10s
  * PID: 5612    Sessions: 1    Processed: 1       Uptime: 1m 8s
  * PID: 5394    Sessions: 1    Processed: 4       Uptime: 3m 30s
  * PID: 5401    Sessions: 1    Processed: 14      Uptime: 3m 30s
  * PID: 5620    Sessions: 1    Processed: 1       Uptime: 1m 8s
  * PID: 5298    Sessions: 1    Processed: 7       Uptime: 4m 33s
  * PID: 5580    Sessions: 1    Processed: 2       Uptime: 1m 9s
  * PID: 5594    Sessions: 1    Processed: 1       Uptime: 1m 8s

/home/B:
  App root: /home/B
  * PID: 5362    Sessions: 0    Processed: 3       Uptime: 4m 2s

/home/C:
  App root: /home/C
  * PID: 5332    Sessions: 0    Processed: 5       Uptime: 4m 18s
  * PID: 5369    Sessions: 0    Processed: 10      Uptime: 3m 30s

相关内容