Squid service stopping due to Cache directory issue



  • Hello everyone. Long time pfSense user here, and yesterday I decided to clear my squid cache. I ran the following from SSH connection:

    squid -k shutdown
    mv /var/squid/cache /var/squid/cache.old
    squid -z
    rm -rf /var/squid/cache.old
    

    I received a permissions error on the initial squid -z. I reran it, and it just hung on Creating Cache Directories.

    Well, now this is my regular syslog feed:

    Sep 9 14:45:46	check_reload_status: Reloading filter
    Sep 9 14:45:46	Squid_Alarm[56305]: Squid has resumed. Reconfiguring filter.
    Sep 9 14:45:46	check_reload_status: Reloading filter
    Sep 9 14:45:46	Squid_Alarm[54604]: Reconfiguring filter...
    Sep 9 14:45:43	squid[14225]: Squid Parent: (squid-1) process 14616 started
    Sep 9 14:45:43	squid[14225]: Squid Parent: will start 1 kids
    Sep 9 14:45:43	Squid_Alarm[9283]: Attempting restart...
    Sep 9 14:45:43	Squid_Alarm[8821]: Squid has exited. Reconfiguring filter.
    Sep 9 14:45:15	php: swapstate_check.php: Squid cache and/or swap.state exceeded size limits. Removing and rotating. File was 1276704 bytes, 0% of total disk space.
    Sep 9 14:45:15	squid[71740]: Squid Parent: (squid-1) process 71959 exited with status 0
    Sep 9 14:45:06	squid[71740]: Squid Parent: (squid-1) process 71959 started
    Sep 9 14:45:06	squid[71740]: Squid Parent: will start 1 kids
    Sep 9 14:45:06	squid[44670]: Squid Parent: (squid-1) process 44997 exited due to signal 9 with status 0
    Sep 9 14:45:00	php: swapstate_check.php: Creating squid cache subdirs in /var/squid/cache
    Sep 9 14:45:00	php: swapstate_check.php: Creating Squid cache dir /var/squid/cache
    

    I have the service Watchdog package restarting the service, so it's not taking me offline permanently right now, but I need to resolve this. Using my Google-Fu, I've found similar threads and, following the advice, have done these steps:

    • Removed clear cache on log rotate

    • Verified proxy is owner of squid subdirectories

    I really need assistance on this. I had no issues until I deleted the cache folder, and now I have regrets :(

    Thanks!



  • Welp. No success, so I changed the cache directory to /var/hddcache, and suddenly it works.

    So there's what you need to do folks.