Varnish crashing when system starts to swap

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Apr 21 09:08:23 CEST 2008


In message <BCA2D4755E06EF44A0278A1D9B217E3F08171B3361 at exchange01.ex.local>, Ca
lle Korjus writes:

>Varnish looks fine until it's had abour 1,5 million requests, then
>we can see the kswapd0 and kswapd1 start working and load average
>rises to about 200 and the machine gets totally unresponsive. Top
>shows a lot of cpu beeing spent on i/o waits and varnish child
>process restarts sometimes. In best
>case the process restarts and the server starts behaving within 5
>minutes but sometimes varnish dies completely. One thing we have
>noticed is that the reserved memory for varnish keeps rising and
>when it crashes it is usually around 14G.

You didn't say which varnish version you are using, but we have fixed
a number of memory leaks in -trunk recently.

You should probably reduce the varnish storage file size to the 
amount of RAM you are willing to spend on Varnish when you run
on the same machine as your backend.

-- 
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