백엔드 가져오기 실패 - varnish가 drupal 백엔드를 가져오지 않습니다.

백엔드 가져오기 실패 - varnish가 drupal 백엔드를 가져오지 않습니다.

저는 drupal 7 애플리케이션(3backends)을 실행하고 있으며 3개의 varnish 서버가 백엔드 가져오기를 계속 거부하고 있습니다. 나는 여기에서 비슷한 오류를 많이 읽었지만 여전히 내 문제를 해결할 수 없습니다. 503 varnish fetch가 전문가 명상에 실패했습니다. 여기 있는 모든 게시물을 읽었으며 모두 높은 시간 제한을 권장하는 것 같았습니다. 저는 600초로 설정했지만 많은 사람들은 .probe를 권장하지 않습니다. round.robin(백엔드 전환)이 있고 여기에 내 백엔드 구성이 있습니다.

backend project1 {
.host = "myhost.ip";
.port = "80";
.connect_timeout = 600s;
.first_byte_timeout = 600s;

.probe = {
.timeout = 600s;
.interval = 10s;
.window = 5;
.threshold = 2;
.request =
"GET HTTP/1.1"
"Host: example.com"
"Connection: close";
}
}

그런데 내 오류 로그와 액세스 로그를 모니터링한 결과 이와 같은 오류가 너무 많다는 것을 알았지만 여러분이 편견을 갖는 것을 원하지 않습니다.

[info] Client prematurely closed connection (broken pipe)

그리고 때때로

reqv failed

참고로 언급하고 싶은 점은 fast-cgi 오류가 여전히 진행 중이지만 이것이 내 광택 오류와 관련이 있다고 생각하지 않는다는 것입니다.

Primary Script unknown  ......, fastcgi, upstream:127.0.0.1

나는 fast-cgi를 통해 nginx+php-fpm을 실행합니다. 백엔드에서 가져오기를 거부하게 만드는 구성 바니시가 무엇인지 정말 잘 모르겠습니다.

이전에 잘못된 nginx 구성으로 인해 이 오류가 발생했기 때문에 여기에 내 nginx 구성이 있습니다.

user nginx nginx;
worker_processes 4;

error_log /var/log/nginx/error.log info;

events {
    worker_connections 8192;
    multi_accept    on;
    use epoll;
}
worker_rlimit_nofile 64000;
http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main
            '$remote_addr - $remote_user [$time_local] '
            '"$request" $status $bytes_sent '
            '"$http_referer" "$http_user_agent" ';

    client_header_timeout 10m;
    client_max_body_size 100m;
    client_body_timeout 10m;
    send_timeout 10m;
    client_body_buffer_size 3m;
    connection_pool_size 256;
    client_header_buffer_size 1k;
    large_client_header_buffers 4 2k;
    request_pool_size 32k;

    gzip            on;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.";
    gzip_min_length 10240;
    gzip_proxied    expired no-cache no-store private auth;
    gzip_types      text/plain application/xml;

    open_file_cache         max=2000 inactive=20s;
    open_file_cache_valid   60s;
    open_file_cache_min_uses        5;
    open_file_cache_errors          off;

    output_buffers 1 32k;
    postpone_output 1460;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    fastcgi_send_timeout 1800;
    fastcgi_read_timeout 1800;
    fastcgi_connect_timeout 1800;
    fastcgi_ignore_client_abort on;
    keepalive_timeout 75 20;
    ignore_invalid_headers on;
    index index.html;

    server {
            listen 80;
            server_name  example.com;
            rewrite ^(.*) http://example.com$1 permanent;
            }
    server {
            listen 80;
            server_name www.example.com;
            access_log /var/log/nginx/access.log main;
            error_log /var/log/nginx/error.log info;              
            root /var/www/public;
            index index.php index.phtml index.html;
            autoindex on;

            gzip_types text/plain text/css application/json application/x-ja
vascript text/xml application/xml application/xml+rss text/javascript applicatio
n/javascript;

            location ~ \..*/*\.php$ {
                    return 403;
            }
            location ~^/sites/.*/private/{
                    return 403;
            }
            location ~^/sites/.*/files/* {
                    try_files $uri @rewrite;
            }
            location ~ (^|/)\. {
                    return 403;
            }

            location / {

                    try_files $uri @rewrite;
                    }
            location @rewrite {
                    rewrite ^ /index.php;

            }
            location ~ \.php$ {
                    try_files $uri @rewrite;
                    #fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_pass 127.0.0.1:9000;
                    fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    fastcgi_buffer_size 128k;
                    fastcgi_buffers 256 16k;
                    fastcgi_busy_buffers_size 256k;
                    fastcgi_temp_file_write_size 256k;
                    fastcgi_keep_conn       off;
                    include /etc/nginx/fastcgi_params;

                    }


            location ~* \.(jpg|jpeg|css|gif|png|js|ico|xml)$ {

                    try_files $uri $uri/ ;
                    access_log off;
                    log_not_found   off;
                    expires 30d;
                    }

}

누군가 이 문제를 디버깅할 방향을 알려줄 수 있나요? pb가 내 바니시가 아닌 내 백엔드에 있다고 확신하지만 왜 웹사이트가 가끔 로드되고 때로는 "백엔드 가져오기 실패 503 - 전문가 명상"이라는 직선/끔찍한 오류가 발생하는지 확실하지 않습니다. 소중한 도움에 감사드립니다.

업데이트:

수정 사항은 gzip을 비활성화하는 것이 었습니다. 빈 콘텐츠가 있고 홈페이지로 리디렉션되었으므로 gzip+ header-content-length=0 (비어 있음)은 니스에 대한 빨간색 플래그를 트리거하고 니스는 크기 0의 항목을 압축하기 위해 건강하지 않은 것으로 레이블을 지정했습니다. 헤더가 잘못되었습니다. gzip을 비활성화하거나 일부 콘텐츠를 서버 응답으로 반환하면 이 문제가 해결됩니다.

답변1

귀하는 .request문서를 지정하지 않은 것 같습니다. 따라서 전체 Drupal 사이트를 프로브로 로드하려고 한다고 가정합니다. 이를 다음과 같이 변경할 수 있습니다.

"GET /sitehealth.html HTTP/1.1"

여기서는 sitehealth.html프로브가 로드할 수 있는 간단한 텍스트 파일입니다.

추가 문제 해결을 위해 프로브를 완전히 비활성화하고 차이가 있는지 확인할 수 있습니까? 캐시를 거치지 않고 웹사이트에 직접 접속하면 오류가 발생하나요?

기본적으로 안정적으로 작동하는 가장 간단한 구성을 얻은 다음 문제가 발생할 때까지 한 번에 하나씩 추가 기능을 추가하십시오.

관련 정보