關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • 提高 Apache 的 MaxClients 選項

    Posted on February 27th, 2009 Sam Tang 1 comment

    如果碰到網頁伺服器突然變慢,然後網頁服務停止,在 apache 的 error log 找到以下語句:

    [error] server reached MaxClients setting, consider raising the MaxClients setting

    那麼就是 Apache 超過最大連線數,如果是 Apache 2.0 的話便不用重新編譯,只要開啟 httpd.conf 修改 MaxClients 選項。


    StartServers 10
    MinSpareServers 10
    MaxSpareServers 15
    MaxClients 200
    MaxRequestsPerChild 10000

    完成後重新啟動 Apache 即可。


     

    One response to “提高 Apache 的 MaxClients 選項”

    1. 感謝分享,收藏.

    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word