Varnish 503 on POST requests once in a while

Maninder Singh mandys at gmail.com
Thu Dec 26 09:51:19 UTC 2019


Okay. Let me set it up and get back to you once i see something in that
log. It happens only once/twice a day so could be a while before i get
back.

On Thu, 26 Dec, 2019, 3:10 pm Guillaume Quintard, <
guillaume at varnish-software.com> wrote:

> Hi,
>
> Most probably, varnishncsa isn't going to give you the full picture, so
> let's go for the exhaustive way:
>
> varnishlog -q "BerespStatus eq 503" -w /whatever/file
>
>
> you can then read the logs with
>
> varnishlog -r /whatever/file
>
>
> (more logging pointers here:
> https://docs.varnish-software.com/tutorials/vsl-query/)
>
> 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.
>
> --
> Guillaume Quintard
>
>
> On Thu, Dec 26, 2019 at 6:33 AM Maninder Singh <mandys at gmail.com> wrote:
>
>> Hi,
>>
>> I am facing a strange problem.
>>
>> I am running varnish 4.1.11 on port 80 which is behind a LB.
>>
>> Varnish then connects to apache 2.4 ( on port 8080 ) and also have
>> php-fpm running.
>>
>> 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 ).
>>
>> Where does this request vanish ?
>>
>> How do I debug this issue ?
>>
>> Some more details:
>>
>> * I have varnishncsa turned on with following flags.
>>
>> 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
>>
>> Here is the entry in varnish log during that time.
>>
>> X.X.X.X, LB.IP.0.0 - - [25/Dec/2019:00:26:40 -0600] 2629363 "POST
>> http://mydomain.com/LetsCelebrate HTTP/1.1" 503 1288 "
>> https://referringdomain.com/LetsCelebrate?hostingUrl=https%3A%2F%2Fxy.abc.com"
>> "Mozilla/5.0 (Linux; Android 9; SM-A920F) AppleWebKit/537.36 (KHTML, like
>> Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36" "mydomain.com" miss
>>
>> In .vcl file I have following set.
>>  .first_byte_timeout = 120s;
>>
>> Now, I am not logging varnish to apache requests ( which backend fetch ).
>> As you can see above I am only logging client requests.
>>
>> Is their a way to log client requests like above but then also log
>> backend fetch failures to another log file ?
>> [ Running 2 instances of varnishncsa ? ]
>>
>> Any pointers ?
>>
>> Please let me know.
>>
>> Thanks.
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20191226/27a134b7/attachment.html>


More information about the varnish-misc mailing list