Varnish 3.0.2 on FreeBSD 8-STABLE: Constant Restart

Robert Shilston robert at shilston.com
Wed Jul 18 09:49:22 CEST 2012


Marc,

We successfully run Varnish in front of a large Wordpress site and achieve a good hit rate.  At a very high level, most access is anonymous, and we simple PIPE access if there's wp-admin in the URL.  We happen to use a custom plugin to manage submitting bans to Varnish, but I believe off the shelf ones are now available.

However, undertaking putting Varnish in front of any site without a strong understanding of how the site works will not yield the best results.  Only by understanding the traffic and requests will you be able to safely get a high degree of caching.


Rob

On 18 Jul 2012, at 02:35, Marc Fournier wrote:

> 
> Okay, I'm lost here … what sort of site is Varnish good for … ?   A news web site where nobody every logs into the site … ?
> 
> For instance, the impression I'm getting is that you couldn't use Varnish in front of a Facebook like site, since none of the hits would be anonymous?  But would be potentially useful in front of a Slashdot like site, where alot of the hits *are* anonymous?
> 
> The reason I started to look at Varnish was a client asked about it in terms of the W3T Cache that is available for Wordpress … it apparently has the ability to 'invalidate cache' in a varnish server, so as to force it to reload from apache … but I don't know enough about Wordpress to know if I can even safely disable cookies, but without disabling cookies, nothing will get cached, making Varnish good as a load balancer, but losing the major benefit …
> 
> … no?
> 
> 
> 
> On 2012-07-13, at 11:53 PM, Nick Tailor wrote:
> 
>> Also you only want anonymous visits cached. All cookies with session Id should be passed to apache and then you want look trying to setup should ur backend fail run off the cache only 
>> 
>> Sent from my iPhone
>> 
>> On Jul 13, 2012, at 10:51 AM, Marc Fournier <lists at hub.org> wrote:
>> 
>>> 
>>> Morning …
>>> 
>>> OS: FreeBSD 8.3-STABLE #2: Mon Jul  2 21:20:02 UTC 2012
>>> 
>>> I am trying to use varnish as a caching front end to a wordpress site … found some wordpress specific templetes for vcl_recv / vcl_fetch, to provide me with a base, and everything starts up, and stays running fine, *until* I change my DNS to have the domain go through Varnish … and then it starts rebooting …
>>> 
>>> This test through, before I switched DNS, I had an uptime (according to varnish stat) of just over 1 hr … as soon as I switched DNS over, uptime kept resetting to 0, with (after switching DNS back again), I'm currently seeing:
>>> 
>>> 0+00:07:44 
>>> Hitrate ratio:        0        0        0
>>> Hitrate avg:     0.0000   0.0000   0.0000
>>> 
>>> And, according to ps, you can see the Child much younger then the Mgr:
>>> 
>>> root at lb1:/var/log # ps aux | grep varnish
>>> www      52281  0.0  0.0 355674084  6432  ??  IJ    5:34PM   0:00.16 varnishd: Varnish-Chld lb1.hospitalityleaders.com (varnishd)
>>> root     74714  0.0  0.0 98032  2636  ??  SsJ   4:21PM   0:00.13 varnishd: Varnish-Mgr lb1.hospitalityleaders.com (varnishd)
>>> root     71856  0.0  0.0   540   328   2  S+J   5:44PM   0:00.00 grep varnish
>>> 
>>> I'm new with this, so not really sure how best to debug … I did see something from PHK in one of my searches talking about an issue with cookies … ?   But I haven't been able to re-find that posting …
>>> 
>>>  I've also, so far, been unable to find a core file, although I'm currently running a find across the whole file system to see if there isn't one …
>>> 
>>>  Any suggestions on where to start debugging this, or more information I can provide, would be appreciated … 
>>> 
>>> Thank you ...
>>> _______________________________________________
>>> varnish-misc mailing list
>>> varnish-misc at varnish-cache.org
>>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> 
> 
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc




More information about the varnish-misc mailing list