varnish backing file gone missing

Mit Rowe mit at stagename.com
Tue Sep 27 14:44:52 CEST 2011


Speaking as a sysadmin:

That cron job is a pretty standard thing; /tmp is expected to be volatile
and i many operating systems (FreeBSD, Ubuntu, Debian) ship with a default
cron job that cleans it up, although at least in the case of FreeBSD it has
the ability to add an 'exclusion' list.

To avoid issues, I usually use /var/run/ for sockets and such.

-Mit


On Mon, Sep 26, 2011 at 9:32 PM, Matt Schurenko <MSchurenko at airg.com> wrote:

> Thanks for the help. It looks like the previous sys admin had  a cron job
> that deleted everything in /tmp.
>
> Sent from my iPhone
>
> On 2011-09-26, at 3:52 PM, "Mark Moseley" <moseleymark at gmail.com> wrote:
>
> > On Mon, Sep 26, 2011 at 3:37 PM, Matt Schurenko <MSchurenko at airg.com>
> wrote:
> >> Yeah it says "deleted" when I use lsof. Is this going to cause a problem
> eventually? Since the file is gone is the kernel just using RAM alone now?
> Swap usage hasn't increased. I'm wondering how it is continuing to function.
> >
> >> -----Original Message-----
> >> From: varnish-misc-bounces at varnish-cache.org [mailto:
> varnish-misc-bounces at varnish-cache.org] On Behalf Of Mark Moseley
> >> Sent: September-26-11 1:00 PM
> >> Cc: varnish-misc at varnish-cache.org
> >> Subject: Re: varnish backing file gone missing
> >>
> >> On Mon, Sep 26, 2011 at 12:54 PM, Matt Schurenko <MSchurenko at airg.com>
> wrote:
> >>> Update:
> >>>
> >>>
> >>>
> >>> I noticed that I mistakenly created a 40GB  zero-filled file rather
> than a
> >>> 48GB one:
> >>>
> >>>
> >>>
> >>> dd if=/dev/zero of=/tmp/varnish-cache bs=1G count=40
> >>>
> >>>
> >>>
> >>> Not sure if that would make any difference.
> >>>
> >>>
> >>>
> >>> Matt Schurenko
> >>> Systems Administrator
> >>>
> >>>
> >>> airG® Share Your World
> >>> Suite 710, 1133 Melville Street
> >>>
> >>> Vancouver, BC  V6E 4E5
> >>>
> >>> P: +1.604.408.2228
> >>>
> >>> F: +1.866.874.8136
> >>>
> >>> E: MSchurenko at airg.com
> >>>
> >>> W: www.airg.com
> >>>
> >>> From: varnish-misc-bounces at varnish-cache.org
> >>> [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Matt
> Schurenko
> >>> Sent: September-26-11 12:43 PM
> >>> To: varnish-misc at varnish-cache.org
> >>> Subject: varnish backing file gone missing
> >>>
> >>>
> >>>
> >>> I just noticed that the backing file I configured varnish to use is now
> >>> gone:
> >>>
> >>>
> >>>
> >>> [root at mvp13 ~]# ps -ef | grep varnishd
> >>>
> >>> root      4419     1  0 Sep07 ?        00:00:00
> /usr/local/sbin/varnishd -s
> >>> file,/tmp/varnish-cache,48G -T 127.0.0.1:2000 -a 0.0.0.0:80 -t 604800
> -f
> >>> /usr/local/etc/varnish/default.vcl -p http_headers 384 -p
> connect_timeout
> >>> 4.0
> >>>
> >>>
> >>>
> >>> [root at mvp13 ~]# ls /tmp/varnish-cache
> >>>
> >>> ls: /tmp/varnish-cache: No such file or directory
> >>>
> >>>
> >>>
> >>> If I do an lsof I see this:
> >>>
> >>>
> >>>
> >>> varnishd   4420 nobody    4u      REG                8,1 51539607552
> >>> 62160904 /tmp/varnish-cache (deleted)
> >>>
> >>>
> >>>
> >>> I'm pretty sure I never deleted it. Is this normal behaviour? What are
> the
> >>> implications of this file being removed while varnish is running?
> Varnishd
> >>> still appears to be working fine. I have another varnish server running
> but
> >>> the backing file is still there. BTW I'm running varnish version 2.1.5.
> >>>
> >>>
> >>>
> >>
> >> Perhaps a log rotation script deleted it? If so and varnishd is still
> >> running, it should show up in lsof with "(deleted)" next to the
> >> pathname.
> >
> > It'll work as long as varnishd has it open. It'll only get released
> > when varnished closes it. I'd suggest moving to something like
> > /var/{lib,cache,run}/varnish
> >
> > _______________________________________________
> > varnish-misc mailing list
> > varnish-misc at varnish-cache.org
> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>



-- 
Will 'Mit' Rowe
Stagename*
*1-866-326-3098
mit at stagename.com <josh at stagename.com>
www.stagename.com
Twitter: @stagename

*The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of this
information by persons or entities other than the intended recipient is
prohibited. If you received this transmission in error, please contact the
sender and delete all material contained herein from your computer.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110927/85945fde/attachment-0003.html>


More information about the varnish-misc mailing list