
어제 약 10분 동안 내 haproxy는 (에서 직접 errorfile 503 /etc/haproxy/errors/503.http
) 503페이지에 달하는 분량을 처리했는데 그 이유는 모르겠습니다. 백엔드에 대한 상태 확인이 없으므로 비활성화된 것으로 표시되지 않았습니다. 통계 페이지에는 한도에 도달했음이 표시되지 않습니다(빨간색으로 표시된 영역).
global
maxconn 20000
tune.ssl.default-dh-param 2048
daemon
...
defaults
log global
mode http
timeout http-request 30s
option httplog
option dontlognull
timeout connect 5s
timeout server 120s
timeout client 30s
...
frontend frontend_for_all_sites
maxconn 20000
mode http
bind *:80
option http-buffer-request
timeout http-request 30s
...
use_backend www_backend if acl_hostname_www
use_backend static_backend if acl_hostname_static
backend www_backend
option forwardfor
server www localhost:9090 maxconn 5000
backend static_backend
option forwardfor
server s localhost:9090 maxconn 5000
왜 그런 일이 발생했는지 알아보려면 다음 어디를 살펴봐야 합니까?
답변1
설정하셨나요 default_backend
?
만약에
use_backend www_backend if acl_hostname_www
use_backend static_backend if acl_hostname_static
실패하면 기본 백엔드가 없으므로503
답변2
그것은 백엔드였고, 백엔드를 실제로 사용할 수 없는지 확인할 수 있도록 %ts
(termination_state) 를 추가한 후 무슨 일이 일어나고 있는지 지적할 수 있었습니다 .log-format