我正在使用Apache + mod_wsgi运行Django应用程序,我已经在Amazon EC2上安装了6个中等Ubuntu服务器,其中2个用于mongo,4个用于Django和apache,使用ebs作为postgresql并在所有Apache服务器周围configuration了一个负载均衡器,每个服务器有4 GB的内存,但在重负载系统变得缓慢,我看到使用顶部命令,Apache使用7个进程,吃大约2.4 GB的RAM。 下面是apache MPM prefork模块configuration
<IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
这是wsgi守护进程
WSGIDaemonProcess example user=abc group=abc processes=2 threads=25
然后我通过以下这篇文章http://fuscata.com/kb/set-maxclients-apache-prefork改变MaxClients到12,但我得到“请求标头读取超时”错误在Apache错误日志。 请帮助我调整Apache以获得更好的性能。