apache - Varnish triggering 503 without timeout -
disclaimer: in moment migrating servers windows linux, see unusual architecture here.
i have following communication between our backend servers:
client -> apache httpd (decrypts ssl - running windows server) -> varnish cache (forward proxy , http cache - running ubuntu 16) -> apache tomcat (application server - running windows server).
we have 200 users active @ peak time , ajax call verify user connection every second.
from time time, our clients receives 503 (backend fetch failed - guru meditation) ajax request. first thought kind of application server slowdown increase timeouts follows:
backend xxx { .host = "<%= $host_api %>"; .port = "<%= $host_port %>"; .first_byte_timeout = 1200s; .between_bytes_timeout = 1200s; .connect_timeout = 10s; }
but problem continued happen. investigated modifying apache access log log time request spent on backend:
the configuration was:
logformat "%h %l %u %t \"%r\" %>s %b **%t/%d**" commomwithtime
so time shown *time_in_seconds/time_in_miliseconds*
when 503 error, receive following line:
200.201.175.53 - - [11/sep/2017:17:16:06 -0300] "get /sistema/verificardesconexao?_=1505154046861 http/1.1" 503 286 **0/0**
so apache telling me varnish returned 503 error instantaneously! in case, impossible timeout error, right?
here 1 varnishlog message 503 error (i had modify sensitive parts):
* << bereq >> 179699819 - begin bereq 179699818 pass - timestamp start: 1505161516.061772 0.000000 0.000000 - bereqmethod - berequrl /sistema/verificardesconexao?_=1505153165280 - bereqprotocol http/1.1 - bereqheader host: 10.1.1.135 - bereqheader accept: application/json, text/javascript, */*; q=0.01 - bereqheader x-requested-with: xmlhttprequest - bereqheader user-agent: mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, gecko) chrome/59.0.3071.115 safari/537.36 - bereqheader content-type: application/json;charset=iso-8859-1 - bereqheader referer: https://www.sistema.com.br/sistema/ - bereqheader accept-encoding: gzip, deflate, br - bereqheader accept-language: pt-br,pt;q=0.8,en-us;q=0.6,en;q=0.4 - bereqheader cookie: jsessionid=0334d2460bd8e8ae9299e546aeb2838f; logo=axis; idiomaselecionado=pt_br - bereqheader x-forwarded-host: www.sistema.com.br - bereqheader x-forwarded-server: www.sistema.com.br - bereqheader x-forwarded-for: [ip], 10.1.1.177 - bereqheader x-varnish: 179699819 - vcl_call backend_fetch - vcl_return fetch - fetcherror no backend connection - timestamp beresp: 1505161516.062073 0.000301 0.000301 - timestamp error: 1505161516.062079 0.000307 0.000006 - berespprotocol http/1.1 - berespstatus 503 - berespreason service unavailable - berespreason backend fetch failed - berespheader date: mon, 11 sep 2017 20:25:16 gmt - berespheader server: varnish - vcl_call backend_error - berespheader content-type: text/html; charset=utf-8 - berespheader retry-after: 5 - vcl_return deliver - storage malloc transient - objprotocol http/1.1 - objstatus 503 - objreason backend fetch failed - objheader date: mon, 11 sep 2017 20:25:16 gmt - objheader server: varnish - objheader content-type: text/html; charset=utf-8 - objheader retry-after: 5 - length 286 - bereqacct 0 0 0 0 0 0 - end
which other cases varnish 503 error happen , how should identify , solve it?
it seems varnish cannot reach or connect backend server log says
fetcherror no backend connection
can check can ping backend varnish , inititate http connection ?
Comments
Post a Comment