title: Why isn't varnish taking into account the malloc limit?
body: <p>I have varnish running with <strong>-s malloc,25G</strong>, but the process keeps growing until it consumes all the server memory and it crashes, restarting the cache.</p>
  
  <p>Any idea what I can check to see what's wrong?</p>
  
  <p>The server has 16 cores, and 32 GB of RAM.<br>
  I am using varnish 3.</p>
  
  <blockquote>
    <p>28346 ?        Ss     0:16 /usr/sbin/varnishd -P /var/run/varnishd.pid -a :9290 -T localhost:6082 -f /etc/varnish/default.vcl <strong>-s malloc,25G</strong> -p thread_pools 16 -p thread_pool_min 160 -p thread_pool_max 16000 -p thread_pool_add_delay 2</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/UuwIu.png" alt="Memory"></p>
  
  <p><img src="https://i.stack.imgur.com/kUKeI.png" alt="Close up"></p>