OPNsense Forum

Archive => 16.7 Legacy Series => Topic started by: wannerch on January 19, 2017, 09:47:12 am

Title: Squid is consuming all free memory and causes device to crash, out of swap space
Post by: wannerch on January 19, 2017, 09:47:12 am
Hi all

I am running opnsense on a OPNsense A10 Quad Core SSD from applianceshop.
I've noticed an issue with my squid proxy running in transparent mode. The issue happens with the following settings:

MemoryCache size in MB : 256
Enable local cache: NO
Cache size in MB: 25000
Number of first-level subdirectories: 16
Number of second-level subdirectories: 256
Maximum object size: 1

After approximately 1d the squid is running out of memory and stops with the log entry
"kernel: pid 78319 (squid), uid 100, was killed: out of swap space"

I am not able to restart the squid service until I increase the cache size value and then after some time the issue is coming back.

To resolve the issue I've already tried the following things:

1) activate the Enable cache size YES
Result => On the harddisk in the directory /var/squid/cache a couple of directories get created and occupy only 385 M on my harddisk

2) manually added the setting "cache deny all" to /usr/local/etc/squid/squid.conf
Result => Entire appliance runns out of memory after 48 hours and needs a cold reboot to get back up again.

It seems that the memory is growing over time and there is no way to limit it.
Thank you all for your help