메뉴 닫기

apache2 ProxyPass 사용 중 503 에러 발생시 해결 법

주의 : 이 글에서는 apache2.conf의 설정을 변경하며 아래의 내용을 따라하더라도 문제해결이 되지 않을수 있습니다.
           충분한 구글링을 진행해본후 따라해보는것을 권장합니다.

503 에러는 ProxyPass를 사용하고 있던 웹서버가 너무 느려 서버를 재시작한후에 발생되어 원인을 찾아보기위해
로그를 확인해보았고 구글 번역을 통해 핵심적이라고 판단되는 로그를 확인하였습니다.

vi /var/log/apache2/error.log

[Wed May 16 16:22:46.341330 2018] [proxy:error] [pid 1256:tid 139909364872960] AH00940: HTTP: disabled connection for (localhost)
[Wed May 16 16:23:20.506709 2018] [proxy:error] [pid 1252:tid 139909482370816] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[Wed May 16 16:23:20.506779 2018] [proxy:error] [pid 1252:tid 139909482370816] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s
(구글 번역 : AH00959 : ap_proxy_connect_backend가 (localhost)에 대해 60 초 동안 작업자를 사용하지 못하도록 설정했습니다.)
[Wed May 16 16:23:20.506792 2018] [proxy_http:error] [pid 1252:tid 139909482370816] [client xxx.xxx.xxx.xxx:xxxxx] AH01114: HTTP: failed to make connection to backend: localhost

문제점을 해결하기위해 검색을 해보니 ProxyPass에 기본적으로 60초로 설정되어있는 retry로 인해 503 에러가 발생한
건이 있었음을 알수있었으며 아래와 같이 apache2의 수정작업후 서비스를 재시작했습니다. 진행한 후에는 503에러가
더이상 나타나지 않음을 확인할수 있었습니다.

/etc/apache2/apache2.conf 수정 전
ProxyPass / https://localhost:8080/ 

/etc/apache2/apache2.conf 수정 후
ProxyPass / https://localhost:8080/ retry=0

서비스 재시작
/etc/init.d/apache2 restart 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x