Actually I'm very newbbie in this varnish stuff, so I don't figure yet how to use the log at varnishlog, but I did what they suggested me. My vcl configuration file its this and it is working now. I have marked strong the changes I did in order to fix this:<div>
<br></div><div><div><font face="'courier new', monospace">backend app01 {</font></div><div><font face="'courier new', monospace"> .host = "<a href="http://app01.site.com">app01.site.com</a>";</font></div>
<div><font face="'courier new', monospace"> .port = "80";</font></div><div><font face="'courier new', monospace"> <b>.connect_timeout = 1.5s;</b></font></div><div><font face="'courier new', monospace"><b> .first_byte_timeout = 45s;</b></font></div>
<div><font face="'courier new', monospace"> .between_bytes_timeout = 30s;</font></div><div><font face="'courier new', monospace"> .probe = {</font></div><div><font face="'courier new', monospace"> .url = "/";</font></div>
<div><font face="'courier new', monospace"> .interval = 5s;</font></div><div><font face="'courier new', monospace"> .timeout = 1s;</font></div><div><font face="'courier new', monospace"> .window = 5;</font></div>
<div><font face="'courier new', monospace"> .threshold = 3;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace">backend app02 {</font></div><div><font face="'courier new', monospace"> .host = "<a href="http://app02.site.com">app02.site.com</a>";</font></div>
<div><font face="'courier new', monospace"> .port = "80";</font></div><div><font face="'courier new', monospace"> <b>.connect_timeout = 1.5s;</b></font></div><div><font face="'courier new', monospace"><b> .first_byte_timeout = 45s;</b></font></div>
<div><font face="'courier new', monospace"> .between_bytes_timeout = 30s;</font></div><div><font face="'courier new', monospace"> .probe = {</font></div><div><font face="'courier new', monospace"> .url = "/";</font></div>
<div><font face="'courier new', monospace"> .interval = 5s;</font></div><div><font face="'courier new', monospace"> .timeout = 1s;</font></div><div><font face="'courier new', monospace"> .window = 5;</font></div>
<div><font face="'courier new', monospace"> .threshold = 3;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace">backend app03 {</font></div><div><font face="'courier new', monospace"> .host = "<a href="http://app03.site.com">app03.site.com</a>";</font></div>
<div><font face="'courier new', monospace"> .port = "80";</font></div><div><font face="'courier new', monospace"> <b>.connect_timeout = 1.5s;</b></font></div><div><font face="'courier new', monospace"><b> .first_byte_timeout = 45s;</b></font></div>
<div><font face="'courier new', monospace"> .between_bytes_timeout = 30s;</font></div><div><font face="'courier new', monospace"> .probe = {</font></div><div><font face="'courier new', monospace"> .url = "/";</font></div>
<div><font face="'courier new', monospace"> .interval = 5s;</font></div><div><font face="'courier new', monospace"> .timeout = 1s;</font></div><div><font face="'courier new', monospace"> .window = 5;</font></div>
<div><font face="'courier new', monospace"> .threshold = 3;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace">backend app04 {</font></div><div><font face="'courier new', monospace"> .host = "<a href="http://app04.site.com">app04.site.com</a>";</font></div>
<div><font face="'courier new', monospace"> .port = "80";</font></div><div><font face="'courier new', monospace"> <b>.connect_timeout = 1.5s;</b></font></div><div><font face="'courier new', monospace"><b> .first_byte_timeout = 45s;</b></font></div>
<div><font face="'courier new', monospace"> .between_bytes_timeout = 30s;</font></div><div><font face="'courier new', monospace"> .probe = {</font></div><div><font face="'courier new', monospace"> .url = "/";</font></div>
<div><font face="'courier new', monospace"> .interval = 5s;</font></div><div><font face="'courier new', monospace"> .timeout = 1s;</font></div><div><font face="'courier new', monospace"> .window = 5;</font></div>
<div><font face="'courier new', monospace"> .threshold = 3;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace">backend app05 {</font></div><div><font face="'courier new', monospace"> .host = "<a href="http://app05.site.com">app05.site.com</a>";</font></div>
<div><font face="'courier new', monospace"> .port = "80";</font></div><div><font face="'courier new', monospace"> <b>.connect_timeout = 1.5s;</b></font></div><div><font face="'courier new', monospace"><b> .first_byte_timeout = 45s;</b></font></div>
<div><font face="'courier new', monospace"> .between_bytes_timeout = 30s;</font></div><div><font face="'courier new', monospace"> .probe = {</font></div><div><font face="'courier new', monospace"> .url = "/";</font></div>
<div><font face="'courier new', monospace"> .interval = 5s;</font></div><div><font face="'courier new', monospace"> .timeout = 1s;</font></div><div><font face="'courier new', monospace"> .window = 5;</font></div>
<div><font face="'courier new', monospace"> .threshold = 3;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace">director app_director round-robin {</font></div><div><font face="'courier new', monospace"> { .backend = app01; }</font></div><div><font face="'courier new', monospace"> { .backend = app02; }</font></div>
<div><font face="'courier new', monospace"> { .backend = app03; }</font></div><div><font face="'courier new', monospace"> { .backend = app04; }</font></div><div><font face="'courier new', monospace"> { .backend = app05; } </font></div>
<div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"># Amazon S3 Backend</font></div><div>
<font face="'courier new', monospace"># --</font></div><div><font face="'courier new', monospace">backend s3 {</font></div><div><font face="'courier new', monospace"> .host = "<a href="http://site.s3-website-us-east-1.amazonaws.com">site.s3-website-us-east-1.amazonaws.com</a>";</font></div>
<div><font face="'courier new', monospace"> .port = "80";</font></div><div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div>
<div><font face="'courier new', monospace">#acl internal {</font></div><div><font face="'courier new', monospace"># "localhost";</font></div><div><font face="'courier new', monospace"># "127.0.0.1";</font></div>
<div><font face="'courier new', monospace">#}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">acl purge {</font></div><div><font face="'courier new', monospace"> "localhost";</font></div>
<div><font face="'courier new', monospace"> "192.168.11.0"/24;</font></div><div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br>
</font></div>
<div><font face="'courier new', monospace">sub vcl_recv {</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> if (req.request == "PURGE") {</font></div>
<div><font face="'courier new', monospace"> if (!client.ip ~ purge) {</font></div><div><font face="'courier new', monospace"> error 405 "Not allowed.";</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"> ban("req.url = " + req.url);</font></div><div><font face="'courier new', monospace"> return (lookup);</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Normalize the host header</font></div><div><font face="'courier new', monospace"> # --</font></div>
<div><font face="'courier new', monospace"> if (req.http.Host ~ "(?i)^(www.)?<a href="http://site.com">site.com</a>") {</font></div><div><font face="'courier new', monospace"> set req.http.host = "<a href="http://www.site.com">www.site.com</a>";</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> set req.backend = app_director;</font></div>
<div><font face="'courier new', monospace"> if (req.http.Host == "<a href="http://s3.site-files.site.com">s3.site-files.site.com</a>" && req.url ~ "\.(flv|mp4|jpg)$") {</font></div><div>
<font face="'courier new', monospace"> unset req.http.cookie;</font></div><div><font face="'courier new', monospace"> unset req.http.cache-control;</font></div><div><font face="'courier new', monospace"> unset req.http.pragma;</font></div>
<div><font face="'courier new', monospace"> unset req.http.expires;</font></div><div><font face="'courier new', monospace"> unset req.http.etag;</font></div><div><font face="'courier new', monospace"> unset req.http.X-Forwarded-For;</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> set req.backend = s3;</font></div><div><font face="'courier new', monospace"> set req.http.host = "<a href="http://site.s3-website-us-east-1.amazonaws.com">site.s3-website-us-east-1.amazonaws.com</a>";</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> return (lookup); </font></div><div><font face="'courier new', monospace"> }</font></div>
<div>
<font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Use anonymous, cached pages if all backends are down.</font></div><div><font face="'courier new', monospace"> if (! req.backend.healthy) {</font></div>
<div><font face="'courier new', monospace"> unset req.http.Cookie;</font></div><div><font face="'courier new', monospace"> set req.grace = 1h;</font></div><div><font face="'courier new', monospace"> } else {</font></div>
<div><font face="'courier new', monospace"> set req.grace = 30s;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div>
<div><font face="'courier new', monospace"> # Add the X-Forwarded-For header</font></div><div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.restarts == 0) {</font></div>
<div><font face="'courier new', monospace"> if (req.http.x-forwarded-for) {</font></div><div><font face="'courier new', monospace"> set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;</font></div>
<div><font face="'courier new', monospace"> } else {</font></div><div><font face="'courier new', monospace"> set req.http.X-Forwarded-For = client.ip;</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Sanely handle the request based on the type</font></div>
<div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.request != "GET" &&</font></div><div><font face="'courier new', monospace"> req.request != "HEAD" &&</font></div>
<div><font face="'courier new', monospace"> req.request != "PUT" &&</font></div><div><font face="'courier new', monospace"> req.request != "POST" &&</font></div><div>
<font face="'courier new', monospace"> req.request != "TRACE" &&</font></div><div><font face="'courier new', monospace"> req.request != "OPTIONS" &&</font></div><div>
<font face="'courier new', monospace"> req.request != "DELETE") {</font></div><div><font face="'courier new', monospace"> /* Non-RFC2616 or CONNECT which is weird. */</font></div><div><font face="'courier new', monospace"> return (pipe);</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Request by post needs no cache</font></div>
<div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.request == "POST") {</font></div><div><font face="'courier new', monospace"> return (pass);</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Admin needs no cache</font></div>
<div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.http.Host ~ "(?i)^(admin.)?<a href="http://site.com">site.com</a>") {</font></div>
<div><font face="'courier new', monospace"> return (pass);</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"> </font></div><div>
<font face="'courier new', monospace"> # Always cache the following file types for all users.</font></div>
<div><font face="'courier new', monospace"> if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|flv|avi|mov|wmv|css|js|html|htm)(\?[a-z0-9]+)?$") {</font></div><div><font face="'courier new', monospace"> unset req.http.Cookie;</font></div>
<div><font face="'courier new', monospace"> return (lookup);</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div>
<font face="'courier new', monospace"> # Login and logout needs no cache</font></div><div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.url ~ "^/usuario/salir" || req.url ~ "^/usuario/redirectWindow" || req.url ~ "^/usuario/al") { </font></div>
<div><font face="'courier new', monospace"> return (pass);</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div>
<font face="'courier new', monospace"> # Requests to /no-cache/ needs no cache</font></div><div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.request == "GET" && req.url ~ "^/no-cache") {</font></div>
<div><font face="'courier new', monospace"> return (pass);</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"> if (req.request == "GET" && req.url ~ "^/rss/siterss") {</font></div>
<div><font face="'courier new', monospace"> return (pass);</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div>
<font face="'courier new', monospace"> # <a href="http://subdomain.site.com">subdomain.site.com</a> and <a href="http://other.com/foro/">other.com/foro/</a> needs no cache</font></div><div><font face="'courier new', monospace"> # --</font></div>
<div><font face="'courier new', monospace"> if (req.http.Host == "<a href="http://subdomain.site.com">subdomain.site.com</a>") {</font></div><div><font face="'courier new', monospace"> return (pass);</font></div>
<div><font face="'courier new', monospace"> } </font></div><div><font face="'courier new', monospace"> if (req.http.Host == "<a href="http://www.other.com">www.other.com</a>" && req.url ~ "^/foro/" && req.http.Cookie ~ "(?i)(somecookie|othercookie)") {</font></div>
<div><font face="'courier new', monospace"> return (pass); </font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div>
<font face="'courier new', monospace"> # Not sure what could match here, but it's in the default.vcl</font></div><div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.request != "GET" && req.request != "HEAD") {</font></div>
<div><font face="'courier new', monospace"> /* We only deal with GET and HEAD by default */</font></div><div><font face="'courier new', monospace"> return (pass);</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Handle compression correctly. Different browsers send different</font></div><div><font face="'courier new', monospace"> # "Accept-Encoding" headers, even though they mostly all support the same</font></div>
<div><font face="'courier new', monospace"> # compression mechanisms. By consolidating these compression headers into</font></div><div><font face="'courier new', monospace"> # a consistent format, we can reduce the size of the cache and get more hits.=</font></div>
<div><font face="'courier new', monospace"> # @see: http:// <a href="http://varnish.projects.linpro.no/wiki/FAQ/Compression">varnish.projects.linpro.no/wiki/FAQ/Compression</a></font></div><div><font face="'courier new', monospace"> if (req.http.Accept-Encoding) {</font></div>
<div><font face="'courier new', monospace"> if (req.http.Accept-Encoding ~ "gzip") {</font></div><div><font face="'courier new', monospace"> # If the browser supports it, we'll use gzip.</font></div>
<div><font face="'courier new', monospace"> set req.http.Accept-Encoding = "gzip";</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"> else if (req.http.Accept-Encoding ~ "deflate") {</font></div>
<div><font face="'courier new', monospace"> # Next, try deflate if it is supported.</font></div><div><font face="'courier new', monospace"> set req.http.Accept-Encoding = "deflate";</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"> else {</font></div><div><font face="'courier new', monospace"> # Unknown algorithm. Remove it and send unencoded.</font></div>
<div><font face="'courier new', monospace"> unset req.http.Accept-Encoding;</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Cache all requests by default, overriding the standard Varnish behavior</font></div><div><font face="'courier new', monospace"> if (req.request == "GET" || req.request == "HEAD") {</font></div>
<div><font face="'courier new', monospace"> /* We only deal with GET and HEAD by default */</font></div><div><font face="'courier new', monospace"> #unset req.http.Cookie;</font></div><div><font face="'courier new', monospace"> return (lookup);</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # If there's a cookie left aft this point do not cache</font></div>
<div><font face="'courier new', monospace"> # or is this easier to keep in the cookie deletion above?</font></div><div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.http.Authorization || req.http.Cookie) {</font></div>
<div><font face="'courier new', monospace"> /* Not cacheable by default */</font></div><div><font face="'courier new', monospace"> return (pass);</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # If we get here, try the cache</font></div><div><font face="'courier new', monospace"> # --</font></div>
<div><font face="'courier new', monospace"> return (lookup);</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace">sub vcl_pipe {</font></div><div><font face="'courier new', monospace"> return (pipe);</font></div><div><font face="'courier new', monospace">}</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_pass {</font></div><div><font face="'courier new', monospace"> return (pass);</font></div>
<div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_hash {</font></div><div><font face="'courier new', monospace"> # Include cookie in cache hash.</font></div>
<div><font face="'courier new', monospace"> # This check is unnecessary because we already pass on all cookies.</font></div><div><font face="'courier new', monospace"> #if (req.http.Cookie) {</font></div>
<div><font face="'courier new', monospace"> # #set req.hash += req.http.Cookie;</font></div><div><font face="'courier new', monospace"> # hash_data(req.http.Cookie);</font></div><div><font face="'courier new', monospace"> #}</font></div>
<div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_hit {</font></div><div><font face="'courier new', monospace"> if (req.request == "PURGE") {</font></div>
<div><font face="'courier new', monospace"> purge;</font></div><div><font face="'courier new', monospace"> error 200 "Purged";</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_miss {</font></div><div><font face="'courier new', monospace"> if (req.request == "PURGE") {</font></div>
<div><font face="'courier new', monospace"> purge;</font></div><div><font face="'courier new', monospace"> error 200 "Purged";</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_fetch {</font></div><div><font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace"> # S3</font></div><div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if (req.http.Host == "<a href="http://s3.site-files.site.com">s3.site-files.site.com</a>" && req.url ~ "\.(flv|mp4|jpg)$") {</font></div>
<div><font face="'courier new', monospace"> remove beresp.http.x-amz-id-2;</font></div><div><font face="'courier new', monospace"> remove beresp.http.x-amz-request-id;</font></div><div><font face="'courier new', monospace"><br>
</font></div><div><font face="'courier new', monospace"> set beresp.ttl = 1w;</font></div><div><font face="'courier new', monospace"> set beresp.grace = 30s;</font></div><div><font face="'courier new', monospace"> </font></div>
<div><font face="'courier new', monospace"> if (beresp.status != 200) {</font></div><div><font face="'courier new', monospace"> return (error);</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # remove all cookies</font></div>
<div><font face="'courier new', monospace"> # unset beresp.http.set-cookie;</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # cache for 12 hours</font></div>
<div><font face="'courier new', monospace"> # set beresp.ttl = 2h;</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Don't allow static files to set cookies.</font></div>
<div><font face="'courier new', monospace"> if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|html|htm|mp4|flv)(\?[a-z0-9]+)?$") {</font></div><div><font face="'courier new', monospace"> unset beresp.http.set-cookie;</font></div>
<div><font face="'courier new', monospace"> set beresp.ttl = 12h;</font></div><div><font face="'courier new', monospace"> } else {</font></div><div><font face="'courier new', monospace"> set beresp.ttl = 30m;</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # If the backend server doesn't return properly, don't send another connection to it</font></div>
<div><font face="'courier new', monospace"> # for 60s and try another backend via restart.</font></div><div><font face="'courier new', monospace"> #</font></div><div><font face="'courier new', monospace"> # <a href="https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html">https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html</a></font></div>
<div><font face="'courier new', monospace"> # --</font></div><div><font face="'courier new', monospace"> if(beresp.status == 500 || beresp.status == 503) {</font></div><div><font face="'courier new', monospace"> <b>if (req.restarts > 3) {</b></font></div>
<div><font face="'courier new', monospace"><b> set beresp.saintmode = 5m;</b></font></div><div><font face="'courier new', monospace"><b> }</b></font></div><div><font face="'courier new', monospace"> if (req.request != "POST") {</font></div>
<div><font face="'courier new', monospace"> return(restart);</font></div><div><font face="'courier new', monospace"> } else {</font></div><div><font face="'courier new', monospace"> error 500 "Failed";</font></div>
<div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"> }</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> # Allow items to be stale if needed.</font></div>
<div><font face="'courier new', monospace"> set beresp.grace = 1h;</font></div><div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">}</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_deliver {</font></div><div><font face="'courier new', monospace"> # if (resp.http.magicmarker) {</font></div>
<div><font face="'courier new', monospace"> # unset resp.http.magicmarker;</font></div><div><font face="'courier new', monospace"> # set resp.http.age = "0";</font></div><div><font face="'courier new', monospace"> # }</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace"> if (obj.hits > 0) {</font></div><div><font face="'courier new', monospace"> set resp.http.X-Cache = "HIT";</font></div>
<div><font face="'courier new', monospace"> } else {</font></div><div><font face="'courier new', monospace"> set resp.http.X-Cache = "MISS";</font></div><div><font face="'courier new', monospace"> }</font></div>
<div><font face="'courier new', monospace"> return (deliver);</font></div><div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div>
<font face="'courier new', monospace"># In the event of an error, show friendlier messages.</font></div><div><font face="'courier new', monospace">sub vcl_error {</font></div><div><font face="'courier new', monospace"> # Otherwise redirect to the homepage, which will likely be in the cache.</font></div>
<div><font face="'courier new', monospace"> set obj.http.Content-Type = "text/html; charset=utf-8";</font></div><div><font face="'courier new', monospace"> synthetic {"</font></div><div><font face="'courier new', monospace"><html></font></div>
<div><font face="'courier new', monospace"><head></font></div><div><font face="'courier new', monospace"> <title>Pagina no disponible temporalmente</title></font></div><div><font face="'courier new', monospace"> <style></font></div>
<div><font face="'courier new', monospace"> body { background: #303030; text-align: center; color: white; }</font></div><div><font face="'courier new', monospace"> #page { border: 1px solid #CCC; width: 500px; margin: 100px auto 0; padding: 30px; background: #323232; }</font></div>
<div><font face="'courier new', monospace"> a, a:link, a:visited { color: #CCC; }</font></div><div><font face="'courier new', monospace"> .error { color: #222; }</font></div><div><font face="'courier new', monospace"> </style></font></div>
<div><font face="'courier new', monospace"></head></font></div><div><font face="'courier new', monospace"><body></font></div><div><font face="'courier new', monospace"> <div id="page"></font></div>
<div><font face="'courier new', monospace"> <h1 class="title">Oops! Houston tenemos problemas!</h1></font></div><div><font face="'courier new', monospace"> <p>La pagina que estas intentando ver por el momento no esta disponible..</p></font></div>
<div><font face="'courier new', monospace"> <p>Intenta <a href="">recargando la pagina </a> o puedes visitar <a href="/">Nuestra pagina principal</a></p></font></div>
<div><font face="'courier new', monospace"> <div class="error">(Error "} + obj.status + " " + obj.response + {")</div></font></div><div><font face="'courier new', monospace"> </div></font></div>
<div><font face="'courier new', monospace"></body></font></div><div><font face="'courier new', monospace"></html></font></div><div><font face="'courier new', monospace">"};</font></div>
<div><font face="'courier new', monospace"> return (deliver);</font></div><div><font face="'courier new', monospace">}</font></div><div><font face="'courier new', monospace"><br></font></div><div>
<font face="'courier new', monospace">sub vcl_init {</font></div><div><font face="'courier new', monospace"> return (ok);</font></div><div><font face="'courier new', monospace">}</font></div><div>
<font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">sub vcl_fini {</font></div><div><font face="'courier new', monospace"> return (ok);</font></div><div>
<font face="'courier new', monospace">}</font></div><div><br></div></div><div><br></div><div><div class="gmail_quote">2012/6/14 Jean-Christian BEDIER <span dir="ltr"><<a href="mailto:jc.bedier@gmail.com" target="_blank">jc.bedier@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I have the same problem too, on random request i read it in my varnishlog:<br>
<br>
11 FetchError c http first read error: -1 104 (Connection reset by peer)<br>
13 BackendClose b farm1<br>
11 VCL_call c error<br>
11 VCL_return c deliver<br>
11 VCL_call c deliver<br>
11 VCL_return c deliver<br>
11 TxProtocol c HTTP/1.1<br>
11 TxStatus c 503<br>
<br>
Did you have the same Abraham ?<br>
<br>
Regards,<br>
<br>
<br>
<br>
On Thu, Jun 14, 2012 at 12:54 AM, Abraham Cruz Sustaita<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:abraham.sustaita@buscacorp.com">abraham.sustaita@buscacorp.com</a>> wrote:<br>
> Thanks a lot. I have made the change you suggested me and it seems its<br>
> working now.<br>
><br>
> I'm still checking but I think its working very fine right now.<br>
><br>
> Thanks a lot again.<br>
><br>
><br>
> 2012/6/13 Hugo Cisneiros (Eitch) <<a href="mailto:hugo.cisneiros@gmail.com">hugo.cisneiros@gmail.com</a>><br>
>><br>
>> On Wed, Jun 13, 2012 at 5:51 PM, Abraham Cruz Sustaita<br>
>><br>
>> <<a href="mailto:abraham.sustaita@buscacorp.com">abraham.sustaita@buscacorp.com</a>> wrote:<br>
>> > I understand varnish have to restart the connection and try again in<br>
>> > another app server (I have 5), but it allways returns the 503 error, so I<br>
>> > understand that means the rule is being ignored.<br>
>><br>
>> The only way to be sure what is happening is to log details from the<br>
>> requests using varnishlog.<br>
>><br>
>> The restart function will reset the request and it goes back to<br>
>> vcl_recv as if it is a new request. But since you're using saintmode,<br>
>> maybe varnish isn't really retrying to fetch this particular URL from<br>
>> the backend. You can do a<br>
>><br>
>> if (req.restarts > 3) {<br>
>> set beresp.saintmode = 5m;<br>
>> }<br>
>><br>
>> and it will restart at least 2 times before inserting the item on<br>
>> saintmode.<br>
>><br>
>> > I have made this change to the vcl file:<br>
>> [...]<br>
>> > Do I have to increase also the first_byte_timeout?<br>
>><br>
>> You need to increase only if the request isn't getting reply data in<br>
>> the first 30 seconds :) You can check this with varnishlog and<br>
>> varnishncsa to be sure.<br>
>><br>
>> --<br>
>> []'s<br>
>> Hugo<br>
>> <a href="http://www.devin.com.br" target="_blank">www.devin.com.br</a><br>
>><br>
>> _______________________________________________<br>
>> varnish-misc mailing list<br>
>> <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
>> <a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> varnish-misc mailing list<br>
> <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
> <a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div><br></div>