503 erros accessing xml generation page

Chir0n io.chir0n at gmail.com
Mon Jan 13 13:20:05 CET 2014


Hi,

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.

I changed many config options and anything worked. Recently I've put the
timeout option in high values, but it didn't worked.

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.

I'm running out of ideas about what to do. Can someone explain me why this
is still happening?

The important piece of my default.vcl are show below:


(...)
backend ws {
  .host ="x.x.x.x";
  .port = "80";
  .connect_timeout = 600s;
  .first_byte_timeout = 600s;
  .between_bytes_timeout = 600s;
  .send_timeout = 600s;
  .sess_timeout = 600s;
  .cli_timeout = 600s;
}

(...)

} elseif (req.url ~ "^/xml/.*") {
    set req.backend = ws;
    return (pipe);
}

Also, this is the piece of log I get when the error occurs:


   60 SessionOpen  c x.x.x.x 35998 0.0.0.0:80
   60 ReqStart     c x.x.x.x 35998 1117143234
   60 RxRequest    c GET
   60 RxURL        c /xml/xxx
   60 RxProtocol   c HTTP/1.0
   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)
   60 RxHeader     c Accept: */*
   60 RxHeader     c Host: www.xxxxxxxxx.com.br
   60 RxHeader     c Connection: Keep-Alive
   60 VCL_call     c recv pass
   60 VCL_call     c hash
   60 Hash         c /xml/xxx
   60 Hash         c www.xxxxxxxxx.com.br
   60 VCL_return   c hash
   60 VCL_call     c pass pass
   60 Backend      c 347 default default
   60 FetchError   c http first read error: -1 11 (Resource temporarily
unavailable)
   60 Backend      c 294 default default
   60 FetchError   c http first read error: -1 11 (Resource temporarily
unavailable)
   60 VCL_call     c error deliver
   60 VCL_call     c deliver deliver
   60 TxProtocol   c HTTP/1.1
   60 TxStatus     c 503
   60 TxResponse   c Service Unavailable
   60 TxHeader     c Content-Type: text/html; charset=utf-8
   60 TxHeader     c Retry-After: 5
   60 TxHeader     c Content-Length: 419
   60 TxHeader     c Accept-Ranges: bytes
   60 TxHeader     c Date: Mon, 13 Jan 2014 12:02:01 GMT
   60 TxHeader     c Age: 120
   60 TxHeader     c Connection: close
   60 TxHeader     c X-Cache: MISS
   60 Length       c 419
   60 ReqEnd       c 1117143234 1389614401.316947937 1389614521.319793940
0.000017881 120.002819061 0.000026941

All configs are shown below:

/usr/local/varnish/bin/varnishadm param.show
acceptor_sleep_decay        0.900000 []
acceptor_sleep_incr         0.001000 [s]
acceptor_sleep_max          0.050000 [s]
auto_restart                on [bool]
ban_dups                    on [bool]
ban_lurker_sleep            0.010000 [s]
between_bytes_timeout       60.000000 [s]
cc_command                  "exec gcc -std=gnu99  -pthread -fpic -shared
-Wl,-x -o %o %s"
cli_buffer                  8192 [bytes]
cli_timeout                 10 [seconds]
clock_skew                  10 [s]
connect_timeout             360.000000 [s]
critbit_cooloff             180.000000 [s]
default_grace               10.000000 [seconds]
default_keep                0.000000 [seconds]
default_ttl                 120.000000 [seconds]
diag_bitmap                 0x0 [bitmap]
esi_syntax                  0 [bitmap]
expiry_sleep                1.000000 [seconds]
fetch_chunksize             128 [kilobytes]
fetch_maxchunksize          262144 [kilobytes]
first_byte_timeout          60.000000 [s]
group                       users (100)
gzip_level                  6 []
gzip_memlevel               8 []
gzip_stack_buffer           4096 [Bytes]
gzip_tmp_space              0 []
gzip_window                 15 []
http_gzip_support           on [bool]
http_max_hdr                64 [header lines]
http_range_support          on [bool]
http_req_hdr_len            8192 [bytes]
http_req_size               12288 [bytes]
http_resp_hdr_len           8192 [bytes]
http_resp_size              8192 [bytes]
idle_send_timeout           60 [seconds]
listen_address              0.0.0.0:80
listen_depth                1024 [connections]
log_hashstring              on [bool]
log_local_address           off [bool]
lru_interval                2 [seconds]
max_esi_depth               5 [levels]
max_restarts                4 [restarts]
nuke_limit                  50 [allocations]
pcre_match_limit            10000 []
pcre_match_limit_recursion  10000 []
ping_interval               3 [seconds]
pipe_timeout                60 [seconds]
prefer_ipv6                 off [bool]
queue_max                   100 [%]
rush_exponent               3 [requests per request]
saintmode_threshold         10 [objects]
send_timeout                1200 [seconds]
sess_timeout                5 [seconds]
sess_workspace              16384 [bytes]
session_linger              50 [ms]
session_max                 100000 [sessions]
shm_reclen                  255 [bytes]
shm_workspace               8192 [bytes]
shortlived                  10.000000 [s]
syslog_cli_traffic          on [bool]
thread_pool_add_delay       2 [milliseconds]
thread_pool_add_threshold   2 [requests]
thread_pool_fail_delay      200 [milliseconds]
thread_pool_max             500 [threads]
thread_pool_min             5 [threads]
thread_pool_purge_delay     1000 [milliseconds]
thread_pool_stack           65536 [bytes]
thread_pool_timeout         300 [seconds]
thread_pool_workspace       16384 [bytes]
thread_pools                2 [pools]
thread_stats_rate           10 [requests]
user                        varnish (1001)
vcc_err_unref               on [bool]
vcl_dir                     /usr/local/varnish/etc/varnish
vcl_trace                   off [bool]
vmod_dir                    /usr/local/varnish/lib/varnish/vmods
waiter                      default (epoll, poll)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140113/4d1de948/attachment.html>


More information about the varnish-misc mailing list