<div dir="ltr">Hi,<div><br></div><div>Most probably, varnishncsa isn't going to give you the full picture, so let's go for the exhaustive way:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">varnishlog -q "BerespStatus eq 503" -w /whatever/file</font></div></blockquote><div><br></div><div>you can then read the logs with</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">varnishlog -r /whatever/file</font></div></blockquote><div><br></div><div>(more logging pointers here: <a href="https://docs.varnish-software.com/tutorials/vsl-query/">https://docs.varnish-software.com/tutorials/vsl-query/</a>)</div><div><br></div><div>If you can get your hands on a failed transaction, we should be able to tell you what went wrong. Most probably, you hit a timeout of some sort. Or it could be that the backend was declared sick, if you have probes.</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 26, 2019 at 6:33 AM Maninder Singh <<a href="mailto:mandys@gmail.com">mandys@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am facing a strange problem.</div><div><br></div><div>I am running varnish 4.1.11 on port 80 which is behind a LB.</div><div><br></div><div>Varnish then connects to apache 2.4 ( on port 8080 ) and also have php-fpm running.</div><div><br></div><div>Now, everything works fine but once in a while I am seeing 503 response from varnish for a POST request. During this time there is no log in apache also ( neither access log nor error log ).</div><div><br></div><div>Where does this request vanish ?</div><div><br></div><div>How do I debug this issue ?</div><div><br></div><div>Some more details:</div><div><br></div><div>* I have varnishncsa turned on with following flags.</div><div><br></div><div>ExecStart=/usr/bin/varnishncsa -q 'not (ReqURL ~ "\.(js|css|png|jpeg|jpg|ico|gif|swf|woff)" or ReqHeader:User-Agent ~ "HTTP-Monitor" or ReqHeader:User-Agent ~ "Monitoring/1.1")' -a -w /var/log/varnish/varnishncsa.log -D -f /etc/sysconfig/varnishncsa<br></div><div><br></div><div>Here is the entry in varnish log during that time.</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif">X.X.X.X, LB.IP.0.0 - - [25/Dec/2019:00:26:40 -0600] 2629363 "POST </span><a href="http://mydomain.com/LetsCelebrate" target="_blank">http://mydomain.com/LetsCelebrate</a><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> HTTP/1.1" 503 1288 "</span><a href="https://referringdomain.com/LetsCelebrate?hostingUrl=https%3A%2F%2Fxy.abc.com" target="_blank">https://referringdomain.com/LetsCelebrate?hostingUrl=https%3A%2F%2Fxy.abc.com</a><span style="color:rgb(0,0,0);font-family:arial,sans-serif">" "Mozilla/5.0 (Linux; Android 9; SM-A920F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36" "</span><a href="http://mydomain.com" target="_blank">mydomain.com</a><span style="color:rgb(0,0,0);font-family:arial,sans-serif">" miss</span><br></div><div><div><br></div><div>In .vcl file I have following set.</div><div> .first_byte_timeout = 120s;<br></div><div><br></div><div>Now, I am not logging varnish to apache requests ( which backend fetch ).</div><div>As you can see above I am only logging client requests.</div><div><br></div><div>Is their a way to log client requests like above but then also log backend fetch failures to another log file ?</div><div>[ Running 2 instances of varnishncsa ? ]</div><div><br></div><div>Any pointers ?</div><div><br></div><div>Please let me know.</div><div><br></div><div>Thanks.<font face="arial, sans-serif"><br></font><p></p><p></p></div></div></div>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div>