在Amazon EC2 Large上运行Magento时,Apache崩溃

所以我花了两天的时间试图弄清楚这一点。 我们在Amazon EC2 Large上托pipe了一个相当高stream量的Magento站点,使用Apache w / mpm-prefork,Varnish和APCcaching。 问题在于,CPU突然以100%的速度飙升,从不退出,增加负载并使页面无法使用。 每次Apache启动时都会发生这种情况,通常在几分钟后。

首先som服务器统计:

  • 处理器:64位
  • vCPU:2
  • 内存(GiB):7.5

现在,我们唯一的补救办法是将实例升级到XLarge,在那里它执行“OK”(平均负载在0.6 – 0.9,但仍然可用)。 尽pipe如此,基于其他网站,大型实例应该足以承载相对较好的性能。

我怀疑我们的prefork设置可能导致这一点。 在大型实例中,我们有以下设置:

<IfModule mpm_prefork_module> StartServers 10 MinSpareServers 10 MaxSpareServers 20 ServerLimit 50 MaxClients 50 MaxRequestsPerChild 4000 </IfModule> Timeout 120 KeepAlive On MaxKeepAliveRequests 1000 KeepAliveTimeout 5 

当升级到XLarge时,我们用一些更高的prefork设置交换:

 <IfModule mpm_prefork_module> StartServers 20 MinSpareServers 20 MaxSpareServers 40 ServerLimit 150 MaxClients 150 MaxRequestsPerChild 8000 </IfModule> 

有没有人有任何想法,我可以看看? 或者有谁愿意分享一个类似的设置?

任何帮助表示赞赏!