<div dir="ltr"><div style="font-size:12.8px">Hi there, </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">We're using Varnish 4.1.3 here and are running into an issue when using a lot of BANs.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">We make a heavy use of BAN-lurker friendly bans, and it seems that overtime BANs accumulate. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">They accumulate to the point where varnish suddenly starts using all the memory available on the system and that only a reboot of the server fixes. The CPU usage also seem to explode.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><span style="font-size:12.8px">The accumulation of BANs seems to be happening when we have a sudden spike in traffic triggering in turn a sudden spike in BAN requests.</span><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Not sure how useful the following information is but:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I was able earlier to run `sudo varnishstat -1 | grep ban` on the server to gather some information, but unfortunately lost all the exact numbers.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I do however recall seeing MAIN.bans, MAIN.ban_<wbr>added and MAIN.ban_created ever increasing and MAIN.ban_deleted staying to the same constant number.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">MAIN.bans_persisted_bytes and MAIN.bans_persisted_<wbr>fragmentation showed both around 410MBytes.<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">We noticed a very similar issue on varnish 3.0.6 where sending too many BAN requests to Varnish would make it crawl to a halt (without necessarily eating all the memory and CPU though). We upgraded to Varnish 4.1.3 hoping it would help, but seems like it didn't.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I also, thanks to varnishlog, realized that we were sending a lot of BAN that were invalid regular expressions. I fixed the issue with the regular expressions and varnishlog isn't showing errors anymore, but currently have no idea if it had anything to do with my original issue.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Has anybody ever run into this issue? I found an old bug report reporting the same kind of behavior: <a href="https://www.varnish-cache.org/trac/ticket/1701" target="_blank">https://www.varnish-<wbr>cache.org/trac/ticket/1701</a></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Cheers, </div><div style="font-size:12.8px">-Hugues</div></div>