Mailing List Archive

varnishncsa, -w option and the HUP signal
Hi,

I suspect I've asked this before:

Quoting the man page:
-w file Write log entries to file instead of displaying
them. The
file will be overwritten unless the -a option was
specified.

If varnishncsa receives a SIGHUP while writing to a
file, it
will reopen the file, allowing the old one to be
rotated
away.

Put shortly, varnishncsa seems to totally ignore HUP signals. No log
file reopening takes place. I see from the source that code is there
to handle it, but I lack the skills and time to figure out why it's
not hit, or not working as (I) expect(ed).

I remember trying this some time ago as well, while varnish 1.0 was
the hotness, and found the same behavior. I've meanwhile resorted to
writing to a fifo buffer and reading from there using flog. Not
pretty, but it works.

/Eirik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20071210/0f6ffa94/attachment.htm
varnishncsa, -w option and the HUP signal [ In reply to ]
Hello,

I'm not sure what version of Varnish you are using, but revision 2270
changed some of the SIGHUP code in varnishncsa:

http://varnish.projects.linpro.no/changeset/2270

Download the latest SVN version and give it a try...

On 12/10/07, Eirik ?verby <ltning at anduin.net> wrote:
> Hi,
>
> I suspect I've asked this before:
>
> Quoting the man page:
> -w file Write log entries to file instead of displaying them. The
> file will be overwritten unless the -a option was
> specified.
>
> If varnishncsa receives a SIGHUP while writing to a file,
> it
> will reopen the file, allowing the old one to be rotated
> away.
>
> Put shortly, varnishncsa seems to totally ignore HUP signals. No log file
> reopening takes place. I see from the source that code is there to handle
> it, but I lack the skills and time to figure out why it's not hit, or not
> working as (I) expect(ed).
>
> I remember trying this some time ago as well, while varnish 1.0 was the
> hotness, and found the same behavior. I've meanwhile resorted to writing to
> a fifo buffer and reading from there using flog. Not pretty, but it works.
>
> /Eirik
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>
>
varnishncsa, -w option and the HUP signal [ In reply to ]
Eirik,

What is the string you are using for varnishncsa?

Steve

On Dec 10, 2007, at 2:04 PM, Eirik ?verby wrote:

> Hi,
>
> I suspect I've asked this before:
>
> Quoting the man page:
> -w file Write log entries to file instead of displaying
> them. The
> file will be overwritten unless the -a option was
> specified.
>
> If varnishncsa receives a SIGHUP while writing to
> a file, it
> will reopen the file, allowing the old one to be
> rotated
> away.
>
> Put shortly, varnishncsa seems to totally ignore HUP signals. No
> log file reopening takes place. I see from the source that code is
> there to handle it, but I lack the skills and time to figure out
> why it's not hit, or not working as (I) expect(ed).
>
> I remember trying this some time ago as well, while varnish 1.0 was
> the hotness, and found the same behavior. I've meanwhile resorted
> to writing to a fifo buffer and reading from there using flog. Not
> pretty, but it works.
>
> /Eirik
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20071210/508546ea/attachment.htm