Varnishd and Supervisord

Poul-Henning Kamp phk at
Thu Apr 19 20:02:15 CEST 2007

In message <46279A07.4080806 at>, James writes:
>Hello all,
>I'm not sure if this is the right mailing list or not, but I am trying 
>to get Varnish working with Supervisord 
>(  The point of supervisord is 
>to make sure varnish is always running and restart it even in the case 
>of a crash.

This is sort of pointless, because Varnish already has its own
supervisor facility:  The management process will restart
the worker process if it dies.

>The problem I am facing is that in order to work with Supervisord, 
>Varnish has to not daemonize. However, with the -d option, the main 
>child thread doesn't start until the start command is given via the 
>telnet interface. Therefore, if varnish crashes and is restarted, the 
>child process will need manual intervention. Is there any way to get the 
>child to start automatically even in debugging mode?

I havn't tried this, but you could try to run it as:

	echo "start" | varnishd -d -d

You will want to use the double -d option for something like

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-misc mailing list