Apache 经常挂起,需要重新启动才能再次工作

Apache 经常挂起,需要重新启动才能再次工作

我在调整 Apache 时遇到了问题。我当前的 mpm 事件配置是

<IfModule mpm_event_module>
  ServerLimit               24
  StartServers               8
  MinSpareThreads          512
  MaxSpareThreads          768
  ThreadsPerChild           64
  MaxRequestWorkers       1536
  MaxConnectionsPerChild  5000
</IfModule>

如果我连续按下 ctrl+r 并持续 20 秒左右,apache 就会挂起,我需要重新启动服务器。在流量高峰期,这种情况也会发生,通常一天内我会遇到 5 次以上的宕机。我正在阅读有关调整 apache mpm 事件的论坛,但无法弄清楚。有人能帮我解决这个问题吗?或者建议对我当前的设置进行一些更改,以便在不挂起 apache 的情况下实现最大性能。我正在使用带有 ubuntu 的 Amazon m3 大型实例

服务器状态显示这样的输出

Current Time: Monday, 22-Jun-2015 06:42:39 UTC
Restart Time: Monday, 22-Jun-2015 06:20:47 UTC
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 21 minutes 52 seconds
Server load: 0.05 0.12 0.14
Total accesses: 5551 - Total Traffic: 51.7 MB
CPU Usage: u41.07 s7.28 cu0 cs0 - 3.69% CPU load
4.23 requests/sec - 40.3 kB/second - 9.5 kB/request
98 requests currently being processed, 862 idle workers
PID Connections Threads Async connections
total   accepting   busy    idle    writing keep-alive  closing
28956   2   yes 2   62  0   0   0
28957   5   yes 4   60  0   0   1
28958   2   yes 2   62  0   0   0
28959   0   yes 0   64  0   0   0
28961   3   yes 2   62  0   0   0
28962   11  yes 11  53  0   0   0
28963   7   yes 7   57  0   0   0
29229   8   yes 8   56  0   0   0
29266   7   yes 7   57  0   0   0
29268   5   yes 5   59  0   0   0
29501   9   yes 10  54  0   0   0
29606   12  yes 10  54  1   0   1
29760   18  yes 18  46  0   0   0
30386   11  yes 11  53  0   0   0
30453   1   yes 1   63  0   0   0
Sum 101     98  862 1   0   2
___WW___________________________________________________________
__________WWW_W_________________________________________________
_______________WW_______________________________________________
________________________________________________________________
____________________________________________________________W_W_
_____W___W__W_______________WWWWWWWW____________________________
_____________________WWWW____________________________________WWW
____________________________________________WWW_WWWWW___________
____________________________________________WW________WWW_____WW
________WWWW__________________W_________________________________
__________W________WWWWWWW_____W____________________________W___
__________________________________WW__WW____WW_WW__W__________W_
_____W________W______WW_W__WWWWW__W__WWWWW_W_________________W__
WWWWWWWWWWW_____________________________________________________
______W_________________________________________________________
................................................................
................................................................
................................................................

相关内容