【问题标题】:Slow apache on ubuntuubuntu 上的慢速 apache
【发布时间】:2014-08-08 14:23:55
【问题描述】:

我们有一个非常标准的 LAMP 堆栈(Ubuntu 12.04 - Apache2 - MySQL - PHP),位于具有大型托管服务提供商的专用服务器上。

几天以来,我们不时遇到网络性能缓慢的问题(请求会成功,但有时需要长达 10-15 秒)。

我尝试使用top 命令检查服务器使用情况,但似乎没有任何异常或过度使用的迹象(cpu 使用率介于 10-30% 之间)。

Tasks: 268 total,   2 running, 266 sleeping,   0 stopped,   0 zombie
Cpu(s):  4.2%us,  2.8%sy,  0.0%ni, 80.3%id, 11.3%wa,  0.0%hi,  1.4%si,  0.0%st
Mem:   8070300k total,  7779400k used,   290900k free,    66648k buffers
Swap:        0k total,        0k used,        0k free,  2799188k cached

有人知道我可以检查哪些其他统计数据以及我应该继续搜索的方向吗?

【问题讨论】:

    标签: apache ubuntu lamp


    【解决方案1】:

    问题在于 Apache 上允许的同时连接数,默认设置为 150(在 /etc/apache2/apache2.conf 文件中)。 我更新了指令:

    <IfModule mpm_prefork_module>
        ServerLimit        1500
        StartServers          5
        MinSpareServers       5
        MaxSpareServers      10
        MaxClients         1500
        MaxRequestsPerChild   0
    </IfModule>
    

    进一步阅读:

    http://oxpedia.org/wiki/index.php?title=Tune_apache2_for_more_concurrent_connections How do you increase the max number of concurrent connections in Apache?

    【讨论】:

      猜你喜欢
      • 2013-06-17
      • 1970-01-01
      • 1970-01-01
      • 2011-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多