[Varnish] #839: Varnish fails to start on boot for some FreeBSD machines

Varnish varnish-bugs at varnish-cache.org
Tue Dec 21 17:22:27 CET 2010

#839: Varnish fails to start on boot for some FreeBSD machines
 Reporter:  james.m.henderson  |       Owner:  phk  
     Type:  defect             |      Status:  new  
 Priority:  normal             |   Milestone:       
Component:  varnishd           |     Version:  trunk
 Severity:  normal             |    Keywords:       
 When init tries to start varnish, the main network interface is not yet up
 (it is still loading asynchronously).  When Varnish parses its
 configuration files, it tests each of the backend urls addresses to see if
 it responds.  If any of the backends do not respond, varnish throws an
 error and will not start.  Since the interface is not yet up, the first
 backend will not respond and varnish will not start.

 In this case all that is required is that Varnish waits a few seconds
 before giving up on the backend.  As a workaround I ended up modifying my
 varnishd rc script to wait until the backend was responding before trying
 to run varnish.

 This is not an issue that is likely to occur on every machine as usually
 the interfaces would be up by the time that varnish is run, but evidently
 sometimes it takes a few seconds and the resulting race condition can stop
 the server from running varnish on boot.  In particular the machines this
 happened on were both chroot jail virtual machines.

Ticket URL: <http://www.varnish-cache.org/trac/ticket/839>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list