Apache HTTP Server

Windows 에서 Apache 성능 저하 이슈 (AcceptEx 관련)

제끼나·2015년 3월 17일·조회 14,274

>> 관련 Apache Bug

-. 내용 : AcceptEx 는 MS 측에서 속도 향상을 위해 accept 의 확장 형태로 만들어 놓은 Network API 인데,

이것이 MS 의 멀티 프로세스 모듈과 충돌하여 나타난 Apache Bug

-. 증상 : 에러 로그 파일에 다음과 같은 에러가 지속적으로 쌓이는 것을 볼 수 있음.

An operation was attempted on something that is not a socket.: winnt_accept: AcceptEx failed. Attempting to recover.

또는

지정된 네트워크 이름을 더 이상 사용할 수 없습니다. : winnt_accept: Asynchronous AcceptEx failed.

또는

세마포 제한 시간이 만료되었습니다. : winnt_accept: Asynchronous AcceptEx failed.

-. 해결 방법 : AcceptEx를 쓰지 않고 전통적인 Accept를 쓰도록 Config를 수정

httpd.conf 에 다음과 같이 추가

<IFModule mpm_winnt_module>
Win32DisableAcceptEx
</IFModule>


※ Apache HTTP Server 버전에 따라 httpd.conf 를 다음과 같이 설정하기도 한다고 함.

Case 1) 2.4 미만인 경우
EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx

Case 2) 2.4 이상인 경우
EnableMMAP off
EnableSendfile off
AcceptFilter http none
AcceptFilter https none

댓글 1

로그인 후 댓글을 남길 수 있습니다.

  • 제끼나제끼나· 2016년 5월 9일
    Apache 2.4 에서는 Win32DisableAcceptEx -> AcceptFilter http none AcceptFilter https none 로 설정이 바뀌었다고 하네요.