Troubleshooting Varnish

Have you tried turning your Varnish off and on again?

Reload Varnish

sudo systemctl reload varnish.service

Stop and start Varnish

sudo systemctl start varnish.service
sudo systemctl stop varnish.service

Restart Varnish

sudo systemctl restart varnish.service

Still NOT working???

Try to start Varnish in debug mode!

For systemv users:

varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1: 2000  -a 0.0.0.0:8080 -d

For systemd users:

varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1: 2000  -a 0.0.0.0:8080 -d

Varnish is crashing?

If your Varnish is crashing it might be due to a number of reasons. Here are a few things you can try.

panics

You can inspect any panic messages by typing the following in the CLI:

panic.show

segfaults

This is a Varnish segmentation error. When this happens with the child process it is logged, the core is dumped and the child process starts up again.

If you need help solving your segfaults issue and can log onto our IRC channel #varnish and get help or if have a subscription, please call us and we will help you fix it.

Varnish gives me Guru Meditation

This means that your backends might be experiencing some kind of issue. To solve an issue like this, checkout varnishhlog.

You can set varnishlog to log all your 503 errors by issuing the following command:

$ varnishlog -q 'RespStatus == 503' -g request

If the error happened just a short time ago the transaction might still be in the shared memory log segment. To get varnishlog to process the whole shared memory log just add the ‘-d’ parameter:

$ varnishlog -d -q 'RespStatus == 503' -g request

Varnish is not caching

If your Varnish is not caching you can follow our simple steps to receive high hit rate or follow the detailed User Guide

For details on troubleshooting Varnish, look at the user guide Troubleshooting Varnish Section