The Varnish distribution comes with several utility programs. The main one is the Varnish daemon varnishd. It accepts and handles HTTP requests from clients and it’s responsible for the cache itself. Among the binaries you get from your Varnish installation, there are five programs that read the Varnish Shared Memory Log (VSL), parse it or extract data from it and present it to you: varnishlog, varnishstat, varnishncsa, varnishtop and varnishhist.
In this blog post I’ll throw the possible errors you can encounter when launching one of the above mentioned programs. You might ask… why? A few weeks back I spent a lot of time trying to fix my Varnish installation, and I fell into the install-remove varnish loop in an attempt to fix it. When I realized a magic fix was never going to happen, I went through the source code and eventually fixed my Varnish.
(I could have simply destroyed my virtual machine, but I really wanted to figure out why my Varnish wasn’t happy.)
Did you know that MaxCDN uses Varnish to handle one million vhosts?