timeout - Varnish stops waiting after 1 second -
this problem gonna make me crazy: varnish istance stops waiting backend response after 1 second. every first call page 503 backend
daemon configured way:
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"
and vcl backend:
backend default { # define 1 backend .host = "127.0.0.1"; # ip or hostname of backend .port = "8080"; # port apache or whatever listening .probe = { .url = "/"; .timeout = 1s; .interval = 1s; .window = 10; .threshold = 8; } .first_byte_timeout = 60s; # how long wait before receive first byte our backend? .connect_timeout = 60s; # how long wait backend connection? .between_bytes_timeout = 60s; # how long wait between bytes received our backend? }
here 1 call in log:
* << 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 - 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
any precious help? suggestion?
pretty sure issue here:
.timeout = 1s; .interval = 1s;
notice of them have time of 1s = 1 second. think what's happening backend's probe timeouts varnish flags "unhealthy" until backend respond in second or less.
try modifying values check whether thats issue or not
Comments
Post a Comment