2016-05-09 1 views
0

ce problème va me rendre fou: mon istance de vernis arrête d'attendre une réponse de backend après exactement 1 seconde. Chaque premier appel à une page est un 503 BackendLe vernis arrête d'attendre après 1 seconde

Daemon est configuré de cette façon:

DAEMON_OPTS="-a :80 \ 
     -T localhost:6082 \ 
     -f /etc/varnish/default.vcl \ 
     -S /etc/varnish/secret \ 
     -p thread_pool_add_delay=2 \ 
     -p thread_pools=4 \ 
     -p thread_pool_min=200 \ 
     -p thread_pool_max=4000 \ 
     -p timeout_linger=50 \ 
     -p connect_timeout=300 \ 
     -p first_byte_timeout=300 \ 
     -p between_bytes_timeout=300 \ 
     -p send_timeout=900 \ 
     -s malloc,3G" 

et le backend VCL:

backend default {   # Define one backend 
.host = "127.0.0.1";  # IP or Hostname of backend 
.port = "8080";   # Port Apache or whatever is listening 
.probe = { 
    .url = "/"; 
    .timeout = 1s; 
    .interval = 1s; 
    .window = 10; 
    .threshold = 8; 
    } 
    .first_byte_timeout  = 60s; # How long to wait before we receive a first byte from our backend? 
    .connect_timeout  = 60s;  # How long to wait for a backend connection? 
    .between_bytes_timeout = 60s;  # How long to wait between bytes received from our backend? 
} 

Voici l'un appel dans le journal:

* <<Request>> 3440734 
- Begin   req 3440733 rxreq 
- Timestamp  Start: 1462781837.623325 0.000000 0.000000 
- Timestamp  Req: 1462781837.623325 0.000000 0.000000 
- ReqStart  10.20.129.118 58572 
- ReqMethod  GET 
- ReqURL   xxxxx.html 
- ReqProtocol HTTP/1.1 
- ReqHeader  Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, image/pjpeg, application/x-shockwave-flash, */* 
- ReqHeader  Referer: http://xxxxxx.html 
- ReqHeader  Accept-Language: it-IT 
- ReqHeader  User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) 
- ReqHeader  Accept-Encoding: gzip, deflate 
- ReqHeader  Host: xxxxxx 
- ReqHeader  DNT: 1 
- ReqHeader  Connection: Keep-Alive 
- ReqHeader  Cookie: fc_uid=p; __utma=127650066.830977012.1423064118.1426582505.1426588086.20; _ga=GA1.3.830977012.1423064118; _gat_UA-13041322-1=1; ZNPCQ003-38303300=71a0f671; ff607e18ab6c715f4bb35b5bbcbe1c56=d82989olp2v0ur3gpl2ouprko6; _ga=GA1.2.830977012.142306411 
- ReqHeader  X-Forwarded-For: 10.20.129.118 
- VCL_call  RECV 
- ReqUnset  Host: xxx 
- ReqHeader  Host: xxx 
- ReqURL   /xxxx.html 
- ReqUnset  Cookie: fc_uid=p; __utma=127650066.830977012.1423064118.1426582505.1426588086.20; _ga=GA1.3.830977012.1423064118; _gat_UA-13041322-1=1; ZNPCQ003-38303300=71a0f671; ff607e18ab6c715f4bb35b5bbcbe1c56=d82989olp2v0ur3gpl2ouprko6; _ga=GA1.2.830977012.142306411 
- ReqHeader  Cookie: fc_uid=p; __utma=127650066.830977012.1423064118.1426582505.1426588086.20; _ga=GA1.3.830977012.1423064118; _gat_UA-13041322-1=1; ZNPCQ003-38303300=71a0f671; ff607e18ab6c715f4bb35b5bbcbe1c56=d82989olp2v0ur3gpl2ouprko6; _ga=GA1.2.830977012.142306411 
- ReqUnset  Cookie: fc_uid=p; __utma=127650066.830977012.1423064118.1426582505.1426588086.20; _ga=GA1.3.830977012.1423064118; _gat_UA-13041322-1=1; ZNPCQ003-38303300=71a0f671; ff607e18ab6c715f4bb35b5bbcbe1c56=d82989olp2v0ur3gpl2ouprko6; _ga=GA1.2.830977012.142306411 
- ReqHeader  Cookie: fc_uid=p; __utma=127650066.830977012.1423064118.1426582505.1426588086.20; _ga=GA1.3.830977012.1423064118; _gat_UA-13041322-1=1; ZNPCQ003-38303300=71a0f671; ff607e18ab6c715f4bb35b5bbcbe1c56=d82989olp2v0ur3gpl2ouprko6; _ga=GA1.2.830977012.142306411 
- ReqHeader  Surrogate-Capability: key=ESI/1.0 
- VCL_return  hash 
- ReqUnset  Accept-Encoding: gzip, deflate 
- ReqHeader  Accept-Encoding: gzip 
- VCL_call  HASH 
- VCL_return  lookup 
- VCL_call  MISS 
- VCL_return  fetch 
- Link   bereq 3440735 fetch 
- Timestamp  Fetch: 1462781838.492085 0.868760 0.868760 
- Timestamp  Process: 1462781838.492101 0.868776 0.000016 
- RespHeader  Date: Mon, 09 May 2016 08:17:18 GMT 
- RespHeader  Server: Varnish 
- RespHeader  X-Varnish: 3440734 
- RespProtocol HTTP/1.1 
- RespStatus  503 
- RespReason  Service Unavailable 
- RespReason  Service Unavailable 
- VCL_call  SYNTH 
- VCL_return  deliver 
- RespHeader  Content-Length: 0 
- Storage  malloc Transient 
- Debug   "RES_MODE 2" 
- RespHeader  Connection: keep-alive 
- Timestamp  Resp: 1462781838.492145 0.868820 0.000044 
- ReqAcct  985 0 985 153 0 153 
- End 

Une aide précieuse? Suggestion?

+0

Que se passe-t-il si vous testez avec un délai/intervalle plus long? Ils sont tous deux 1 seconde - facile de penser que c'est l'un de ceux-là. – Jensd

Répondre

0

que la question Jolie est ici:

.timeout = 1s; 
.interval = 1s; 

Notez que tous ont un temps de 1 s = 1 seconde. Je pense que ce qui se passe est le délai d'expiration de la sonde du backend donc le vernissage le signale comme "malsain" jusqu'à ce que votre backend réponde en une seconde ou moins. Essayez de modifier ces valeurs pour vérifier si c'est le problème ou non.