Hi Pierig,<div><br><br><div class="gmail_quote">On Wed, Aug 10, 2011 at 3:49 PM, Pierig Le Saux <span dir="ltr"><<a href="mailto:pierig56@gmail.com">pierig56@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hello,<br>
<br>
I am fairly new to varnish, and am trying to troubleshoot some sort of memory leak I have with varnishd.<br>
<br>
The server used is a vmware guest with dual cpu and 5gigs of ram. The traffic it handles is around 20Mbits, and it achieves a cache hit rate of approximately 40%.<br></blockquote><div><br></div><div>Rigth. I see you run with 3GB of memory allocated to malloc.</div>

<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
As you can see in the following vcl, we are using an in house module that checks for tokens - However if we bypass the module, we still have the out of memory problem.<br>
<br>
I have tried varnish 3beta1,3beta2, 3.0-1  and even svn version from 20110808.<br>
<br>
I am certain it is only a configuration mistake, since many of you out there aren't facing memory leak issues.<br></blockquote><div><br></div><div>Actually I think it is a configuration issue. First, the OOM killer can be quite aggressive. You might be running low on swap space and so the OOM killer will kill Varnish the moment it fails to allocate any memory instead of pushing the unused bits of Varnish out onto swap. So, dramatically increasing swap space will make the problem a lot less painfull. Paging is still painful, however, and you should reduce the memory allocated to Varnish to the moment where you no longer are swapping (much).</div>

<div><br></div><div>Depending on what sort of data you're putting into Varnish a lot of memory can be allocated in addition to what you give to -s malloc. So, I suggest you add memory to the server or reduce the amount given to -s malloc.</div>

<div><br></div></div><br>-- <br><img src="http://www.varnish-software.com/sites/default/files/varnishsoft_white_190x47.png"><div>Per Buer, CEO<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br><i>Varnish makes websites fly!</i><div>

<a href="http://www.varnish-software.com/whitepapers" target="_blank">Whitepapers</a> | <a href="http://www.youtube.com/watch?v=x7t2Sp174eI" target="_blank">Video</a> | <a href="https://twitter.com/varnishsoftware" target="_blank">Twitter</a> <br>

<br></div></div><br>
</div>