<div dir="ltr">Hi,<br><br>I'm getting 503 erros when trying to access a slow web page. This page generate a xml and sometimes it can take about 5 minutes to load.<br><br>I changed many config options and anything worked. Recently I've put the timeout option in high values, but it didn't worked. <br>
<br>An important information: Varnish is istalled on a different machine of Apache. This error don't happen on a test environment where Varnish is installed on the same machine of Apache. <br><br>I'm running out of ideas about what to do. Can someone explain me why this is still happening?<br>
<br>The important piece of my default.vcl are show below:<br><br><br>(...)<br>backend ws {<br> .host ="x.x.x.x";<br> .port = "80";<br> .connect_timeout = 600s;<br> .first_byte_timeout = 600s;<br> .between_bytes_timeout = 600s;<br>
.send_timeout = 600s;<br> .sess_timeout = 600s;<br> .cli_timeout = 600s;<br>}<br><br>(...)<br><br>} elseif (req.url ~ "^/xml/.*") {<br> set req.backend = ws;<br> return (pipe);<br>}<br><br>Also, this is the piece of log I get when the error occurs:<br>
<br><br> 60 SessionOpen c x.x.x.x 35998 <a href="http://0.0.0.0:80">0.0.0.0:80</a><br> 60 ReqStart c x.x.x.x 35998 1117143234<br> 60 RxRequest c GET<br> 60 RxURL c /xml/xxx<br> 60 RxProtocol c HTTP/1.0<br>
60 RxHeader c User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)<br> 60 RxHeader c Accept: */*<br> 60 RxHeader c Host: <a href="http://www.xxxxxxxxx.com.br">www.xxxxxxxxx.com.br</a><br>
60 RxHeader c Connection: Keep-Alive<br> 60 VCL_call c recv pass<br> 60 VCL_call c hash<br> 60 Hash c /xml/xxx<br> 60 Hash c <a href="http://www.xxxxxxxxx.com.br">www.xxxxxxxxx.com.br</a><br>
60 VCL_return c hash<br> 60 VCL_call c pass pass<br> 60 Backend c 347 default default<br> 60 FetchError c http first read error: -1 11 (Resource temporarily unavailable)<br> 60 Backend c 294 default default<br>
60 FetchError c http first read error: -1 11 (Resource temporarily unavailable)<br> 60 VCL_call c error deliver<br> 60 VCL_call c deliver deliver<br> 60 TxProtocol c HTTP/1.1<br> 60 TxStatus c 503<br>
60 TxResponse c Service Unavailable<br> 60 TxHeader c Content-Type: text/html; charset=utf-8<br> 60 TxHeader c Retry-After: 5<br> 60 TxHeader c Content-Length: 419<br> 60 TxHeader c Accept-Ranges: bytes<br>
60 TxHeader c Date: Mon, 13 Jan 2014 12:02:01 GMT<br> 60 TxHeader c Age: 120<br> 60 TxHeader c Connection: close<br> 60 TxHeader c X-Cache: MISS<br> 60 Length c 419<br> 60 ReqEnd c 1117143234 1389614401.316947937 1389614521.319793940 0.000017881 120.002819061 0.000026941<br>
<br>All configs are shown below:<br><br>/usr/local/varnish/bin/varnishadm param.show <br>acceptor_sleep_decay 0.900000 []<br>acceptor_sleep_incr 0.001000 [s]<br>acceptor_sleep_max 0.050000 [s]<br>
auto_restart on [bool]<br>ban_dups on [bool]<br>ban_lurker_sleep 0.010000 [s]<br>between_bytes_timeout 60.000000 [s]<br>cc_command "exec gcc -std=gnu99 -pthread -fpic -shared -Wl,-x -o %o %s"<br>
cli_buffer 8192 [bytes]<br>cli_timeout 10 [seconds]<br>clock_skew 10 [s]<br>connect_timeout 360.000000 [s]<br>critbit_cooloff 180.000000 [s]<br>default_grace 10.000000 [seconds]<br>
default_keep 0.000000 [seconds]<br>default_ttl 120.000000 [seconds]<br>diag_bitmap 0x0 [bitmap]<br>esi_syntax 0 [bitmap]<br>expiry_sleep 1.000000 [seconds]<br>
fetch_chunksize 128 [kilobytes]<br>fetch_maxchunksize 262144 [kilobytes]<br>first_byte_timeout 60.000000 [s]<br>group users (100)<br>gzip_level 6 []<br>
gzip_memlevel 8 []<br>gzip_stack_buffer 4096 [Bytes]<br>gzip_tmp_space 0 []<br>gzip_window 15 []<br>http_gzip_support on [bool]<br>http_max_hdr 64 [header lines]<br>
http_range_support on [bool]<br>http_req_hdr_len 8192 [bytes]<br>http_req_size 12288 [bytes]<br>http_resp_hdr_len 8192 [bytes]<br>http_resp_size 8192 [bytes]<br>idle_send_timeout 60 [seconds]<br>
listen_address <a href="http://0.0.0.0:80">0.0.0.0:80</a><br>listen_depth 1024 [connections]<br>log_hashstring on [bool]<br>log_local_address off [bool]<br>lru_interval 2 [seconds]<br>
max_esi_depth 5 [levels]<br>max_restarts 4 [restarts]<br>nuke_limit 50 [allocations]<br>pcre_match_limit 10000 []<br>pcre_match_limit_recursion 10000 []<br>ping_interval 3 [seconds]<br>
pipe_timeout 60 [seconds]<br>prefer_ipv6 off [bool]<br>queue_max 100 [%]<br>rush_exponent 3 [requests per request]<br>saintmode_threshold 10 [objects]<br>
send_timeout 1200 [seconds]<br>sess_timeout 5 [seconds]<br>sess_workspace 16384 [bytes]<br>session_linger 50 [ms]<br>session_max 100000 [sessions]<br>
shm_reclen 255 [bytes]<br>shm_workspace 8192 [bytes]<br>shortlived 10.000000 [s]<br>syslog_cli_traffic on [bool]<br>thread_pool_add_delay 2 [milliseconds]<br>
thread_pool_add_threshold 2 [requests]<br>thread_pool_fail_delay 200 [milliseconds]<br>thread_pool_max 500 [threads]<br>thread_pool_min 5 [threads]<br>thread_pool_purge_delay 1000 [milliseconds]<br>
thread_pool_stack 65536 [bytes]<br>thread_pool_timeout 300 [seconds]<br>thread_pool_workspace 16384 [bytes]<br>thread_pools 2 [pools]<br>thread_stats_rate 10 [requests]<br>
user varnish (1001)<br>vcc_err_unref on [bool]<br>vcl_dir /usr/local/varnish/etc/varnish<br>vcl_trace off [bool]<br>vmod_dir /usr/local/varnish/lib/varnish/vmods<br>
waiter default (epoll, poll)<br><br></div>