does anyone successfully used persistent storage in varnish?

Piotr Teodorowski piotr.teodorowski at contium.pl
Thu Jul 22 12:20:03 CEST 2010


On Thursday 22 of July 2010 11:30:08 Marc Fournier wrote:
> Hello,
> 
> > Sorry for such a general question. But seems it does not work just
> > simply use the "-s persistent <filename>, <size>" when start.
> > Is there something i am missing?
> > Does anyone successfully used persistent storage in varnish?
> 
> Glad to see I'm not the only one having trouble using this feature :-)
> 
> There was this thread on the list a couple of weeks ago:
> http://lists.varnish-cache.org/pipermail/varnish-misc/2010-June/004307.html
> 
> As I understand, it might work, depending on how and when the shutdown
> of varnishd happens. But I have no clue how to stop it in a way which
> would allow a successful reload of the existing cache at the next
> start.
> 
> Marc
Hi,

varnishd -V
varnishd (varnish-2.1.2 SVN ) (debian squeeze)

DAEMON_OPTS="-a :8081 \
             -T 127.0.0.1:6082 \
             -f /etc/varnish/default.vcl \
             -w 100,2000 \
             -s persistent,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"

stop & start:
varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 stop
varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 start

and it seems that it works.

If I use /etc/init.d/varnish stop it doesn't work (it uses start-stop-daemon)

Piotr




More information about the varnish-misc mailing list