Squid cache and/or swap.state exceeded size limits.
-
Good Morning,
I am having trouble keeping the Squid service running. I have tried to read through the forum posts & other online resources but have come up empty on how to solve this. Any assistance would be greatly appreciated.
pfSense 2.2.4
squid3 0.3.4
squidGuard 1.9.15Intel: Atom CPU D2500 @ 1.86GHz, Dual Core
25% of 4,044 MB Memory Usage
0% of 8192 MB SWAP Usage
Disk usage (ufs): 10% of 50G
Disk usage (ufs in RAM): 5% of 3.4MLog
Sep 24 11:07:37 squid[91305]: Squid Parent: (squid-1) process 91658 started
Sep 24 11:07:37 squid[91305]: Squid Parent: will start 1 kids
Sep 24 11:00:10 php: swapstate_check.php: Squid cache and/or swap.state exceeded size limits. Removing and rotating. File was 72 bytes, 0% of total disk space.
Sep 24 11:00:10 squid[77526]: Squid Parent: (squid-1) process 77919 exited with status 0
Sep 24 11:00:06 squid[77526]: Squid Parent: (squid-1) process 77919 started
Sep 24 11:00:06 squid[77526]: Squid Parent: will start 1 kids
Sep 24 11:00:06 php: swapstate_check.php: The command '/usr/pbi/squid-amd64/sbin/squid -k kill -f /usr/pbi/squid-amd64/local/etc/squid/squid.conf' returned exit code '1', the output was 'squid: ERROR: No running copy'
Sep 24 11:00:05 check_reload_status: Syncing firewall
Sep 24 11:00:05 squid[29299]: Squid Parent: (squid-1) process 30079 exited with status 0
Sep 24 11:00:00 php: swapstate_check.php: Creating squid cache subdirs in /var/squid/cache
Sep 24 11:00:00 php: pfblockerng.php: [pfBlockerNG] Starting sync process.
Sep 24 11:00:00 php: swapstate_check.php: Creating Squid cache dir /var/squid/cache
Sep 24 10:55:07 php-fpm[54202]: /rc.filter_configure_sync: Could not find IPv6 gateway for interface (lan).
Sep 24 10:54:44 php-fpm[20844]: /rc.filter_configure_sync: Could not find IPv6 gateway for interface (lan).
Sep 24 10:54:35 check_reload_status: Reloading filter
Sep 24 10:54:33 php-fpm[18544]: /pkg_edit.php: Reloading Squid for configuration sync
Sep 24 10:54:31 php-fpm[18544]: /pkg_edit.php: Checked cron job for /usr/local/pkg/swapstate_check.php clean; , no change needed
Sep 24 10:54:31 php-fpm[18544]: /pkg_edit.php: Checked cron job for /usr/local/pkg/swapstate_check.php clean; /usr/pbi/squid-amd64/sbin/squid -k rotate -f /usr/pbi/squid-amd64/local/etc/squid/squid.conf, no change needed
Sep 24 10:54:28 php-fpm[18544]: /pkg_edit.php: [Squid] - Squid_resync function call pr:1 bp: rpc:no
Sep 24 10:54:28 check_reload_status: Reloading filter
Sep 24 10:54:28 check_reload_status: Syncing firewall
Sep 24 10:54:26 check_reload_status: Reloading filter
Sep 24 10:54:26 squid[29299]: Squid Parent: (squid-1) process 30079 started
Sep 24 10:54:26 squid[29299]: Squid Parent: will start 1 kidsBest-
Darren
-
Ran into the issue a week ago. Squid seemed to randomly stop on its own.
Workaround was to go to the Local Cache page and uncheck the box Clear cache on log rotate. -
Thank you trinidadrancheria! I can confirm, that unchecking Clear Cache on Log Rotate did fix the issue. Much appreciated!
Best-
Darren
-
I'll replace the log message with something less misleading, reflecting the user configuration and reasons why's it being cleared. Done here:
https://raw.githubusercontent.com/doktornotor/pfsense-packages/patch-2/config/squid3/34/swapstate_check.php
Also changed the insane cronjob to not run every 15 minutes but every 6 hours instead. There are major cleanups and bunch of fixes for the Squid3 thing @ https://github.com/pfsense/pfsense-packages/pull/1080 so if you can test the whole thing and provide feedback here it'll be appreciated.
-
Already applied the fix, this has been my problem for weeks. I Will give feedback about the results.
Thank you.
Already tested it, squid stop after the swap state cron was executed. I end up unchecking the box Clear cache on log rotate under Local Cache page
-
Already tested it, squid stop after the swap state cron was executed. I end up unchecking the box Clear cache on log rotate under Local Cache page
squid_dash_z('clean') now restarts the service; wait for 0.3.6 or grab the whole batch of fixes from https://github.com/pfsense/pfsense-packages/pull/1083/ since the linked commit alone will not work without the other changes.