본문 바로가기

Server Story..../apache

아파치 동접자가 많아서 다운될경우

기본값
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 15
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>

변경한다.
KeepAlive on
MaxKeepAliveRequests 20
KeepAliveTimeout 5
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt.c>
ThreadLimit 3000
ThreadsPerChild 3000
MaxRequestsPerChild 0
</IfModule>

ThreadLimit 는 1.x 버전의 MaxClients 와 같은 기능을 하는 것 같다.
ThreadLimit 의 기본값은 1920 이며 ThreadsPerChild 는 ThreadLimit 를 넘을 수 없다.

ThreadLimit 에 대한 설명은 아래 링크를 참조한다.
http://httpd.apache.org/docs/2.0/mod/mpm_common.html#threadlimit