Speaking as a sysadmin:<div><br></div><div>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.<div>
<br></div><div>To avoid issues, I usually use /var/run/ for sockets and such.<div><br></div><div>-Mit</div><div><br><br><div class="gmail_quote">On Mon, Sep 26, 2011 at 9:32 PM, Matt Schurenko <span dir="ltr"><<a href="mailto:MSchurenko@airg.com">MSchurenko@airg.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks for the help. It looks like the previous sys admin had a cron job that deleted everything in /tmp.<br>
<br>
Sent from my iPhone<br>
<div><div></div><div class="h5"><br>
On 2011-09-26, at 3:52 PM, "Mark Moseley" <<a href="mailto:moseleymark@gmail.com">moseleymark@gmail.com</a>> wrote:<br>
<br>
> On Mon, Sep 26, 2011 at 3:37 PM, Matt Schurenko <<a href="mailto:MSchurenko@airg.com">MSchurenko@airg.com</a>> wrote:<br>
>> 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.<br>
><br>
>> -----Original Message-----<br>
>> From: <a href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a> [mailto:<a href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a>] On Behalf Of Mark Moseley<br>
>> Sent: September-26-11 1:00 PM<br>
>> Cc: <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
>> Subject: Re: varnish backing file gone missing<br>
>><br>
>> On Mon, Sep 26, 2011 at 12:54 PM, Matt Schurenko <<a href="mailto:MSchurenko@airg.com">MSchurenko@airg.com</a>> wrote:<br>
>>> Update:<br>
>>><br>
>>><br>
>>><br>
>>> I noticed that I mistakenly created a 40GB zero-filled file rather than a<br>
>>> 48GB one:<br>
>>><br>
>>><br>
>>><br>
>>> dd if=/dev/zero of=/tmp/varnish-cache bs=1G count=40<br>
>>><br>
>>><br>
>>><br>
>>> Not sure if that would make any difference.<br>
>>><br>
>>><br>
>>><br>
>>> Matt Schurenko<br>
>>> Systems Administrator<br>
>>><br>
>>><br>
>>> airGŪ Share Your World<br>
>>> Suite 710, 1133 Melville Street<br>
>>><br>
>>> Vancouver, BC V6E 4E5<br>
>>><br>
>>> P: <a href="tel:%2B1.604.408.2228" value="+16044082228">+1.604.408.2228</a><br>
>>><br>
>>> F: <a href="tel:%2B1.866.874.8136" value="+18668748136">+1.866.874.8136</a><br>
>>><br>
>>> E: <a href="mailto:MSchurenko@airg.com">MSchurenko@airg.com</a><br>
>>><br>
>>> W: <a href="http://www.airg.com" target="_blank">www.airg.com</a><br>
>>><br>
>>> From: <a href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a><br>
>>> [mailto:<a href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a>] On Behalf Of Matt Schurenko<br>
>>> Sent: September-26-11 12:43 PM<br>
>>> To: <a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
>>> Subject: varnish backing file gone missing<br>
>>><br>
>>><br>
>>><br>
>>> I just noticed that the backing file I configured varnish to use is now<br>
>>> gone:<br>
>>><br>
>>><br>
>>><br>
>>> [root@mvp13 ~]# ps -ef | grep varnishd<br>
>>><br>
>>> root 4419 1 0 Sep07 ? 00:00:00 /usr/local/sbin/varnishd -s<br>
>>> file,/tmp/varnish-cache,48G -T <a href="http://127.0.0.1:2000" target="_blank">127.0.0.1:2000</a> -a <a href="http://0.0.0.0:80" target="_blank">0.0.0.0:80</a> -t 604800 -f<br>
>>> /usr/local/etc/varnish/default.vcl -p http_headers 384 -p connect_timeout<br>
>>> 4.0<br>
>>><br>
>>><br>
>>><br>
>>> [root@mvp13 ~]# ls /tmp/varnish-cache<br>
>>><br>
>>> ls: /tmp/varnish-cache: No such file or directory<br>
>>><br>
>>><br>
>>><br>
>>> If I do an lsof I see this:<br>
>>><br>
>>><br>
>>><br>
>>> varnishd 4420 nobody 4u REG 8,1 51539607552<br>
>>> 62160904 /tmp/varnish-cache (deleted)<br>
>>><br>
>>><br>
>>><br>
>>> I'm pretty sure I never deleted it. Is this normal behaviour? What are the<br>
>>> implications of this file being removed while varnish is running? Varnishd<br>
>>> still appears to be working fine. I have another varnish server running but<br>
>>> the backing file is still there. BTW I'm running varnish version 2.1.5.<br>
>>><br>
>>><br>
>>><br>
>><br>
>> Perhaps a log rotation script deleted it? If so and varnishd is still<br>
>> running, it should show up in lsof with "(deleted)" next to the<br>
>> pathname.<br>
><br>
> It'll work as long as varnishd has it open. It'll only get released<br>
> when varnished closes it. I'd suggest moving to something like<br>
> /var/{lib,cache,run}/varnish<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>
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></div></div></blockquote></div><br><br clear="all"><div><br>
</div>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><span style="color:gray">Will 'Mit' Rowe<br>Stagename</span><i><br></i><span style="color:rgb(153, 153, 153)">1-866-326-3098</span><br>
<span style="color:rgb(153, 153, 153)"><a href="mailto:josh@stagename.com" style="color:rgb(42, 93, 176)" target="_blank">mit@stagename.com</a></span><br style="color:rgb(153, 153, 153)"><span style="color:rgb(153, 153, 153)"><a href="http://www.stagename.com/" style="color:rgb(42, 93, 176)" target="_blank">www.stagename.com</a></span><br>
<span style="color:rgb(153, 153, 153)">Twitter: @stagename</span><br style="color:rgb(153, 153, 153)"><br style="color:rgb(153, 153, 153)"><span style="font-size:8pt;color:rgb(153, 153, 153)"></span><i><span style="font-size:8pt;color:gray">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.</span></i><span style="font-size:8pt;color:gray"></span> </span><br>
</div></div></div>