Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Can't Change Squid Cache Size

    Scheduled Pinned Locked Moved pfSense Packages
    7 Posts 2 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Q
      qwaven
      last edited by

      Hi all,

      I'm running Squid3 on the latest PF Sense. I've been pretty much running it with defaults and now I am trying to fine tune it a bit more. Tried to adjust the disk cache size from 100mb to 2048. Squid fails to start after restarting the service. I do not see any errors generated on the system log page.

      
      Jun 6 08:43:29 	squid[8837]: Squid Parent: child process 9169 started
      Jun 6 08:40:38 	dansguardian[53333]: Error connecting to proxy
      Jun 6 08:38:57 	squid[49714]: Squid Parent: child process 50228 started
      Jun 6 08:38:46 	squid[40249]: Squid Parent: child process 40832 started
      Jun 6 08:38:44 	squid[58522]: Exiting due to unexpected forced shutdown
      Jun 6 08:38:44 	squid[58522]: Squid Parent: child process 58895 exited due to signal 15 with status 0
      Jun 6 08:38:29 	check_reload_status: Reloading filter
      Jun 6 08:38:29 	php: /pkg_edit.php: Reloading Squid for configuration sync
      Jun 6 08:38:29 	php: /pkg_edit.php: [squid] xmlrpc sync is starting.
      Jun 6 08:38:27 	check_reload_status: Syncing firewall
      Jun 6 08:37:57 	check_reload_status: Reloading filter
      Jun 6 08:37:57 	squid[58522]: Squid Parent: child process 58895 started
      Jun 6 08:37:57 	php: /pkg_edit.php: Starting Squid
      Jun 6 08:37:57 	php: /pkg_edit.php: [squid] xmlrpc sync is starting.
      Jun 6 08:37:55 	check_reload_status: Syncing firewall
      
      

      Does anyone have any thoughts?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        try to run squid -z on console/ssh

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • Q
          qwaven
          last edited by

          Thanks for your help.

          Tried the command and it created the directories, however Squid still does not load.

          Looking in the Squid config file I see my settings are reflected.

          
          acl dynamic urlpath_regex cgi-bin \?
          cache deny dynamic
          cache_mem 200 MB
          maximum_object_size_in_memory 32 KB
          memory_replacement_policy heap GDSF
          cache_replacement_policy heap LFUDA
          cache_dir ufs /var/squid/cache 2048 16 256
          minimum_object_size 0 KB
          maximum_object_size 2048 KB
          offline_mode offcache_swap_low 90
          cache_swap_high 95
          
          

          However running Squid from the command line does start Squid and is reflected as so in the services page.

          If I restart Squid it fails to load again. So I take it Squid will fail to start if I reboot also?

          Thoughts?

          Thanks!

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            Try to start it on console to get the error.

            squid -NsXY or /usr/local/etc/rc.d/squid.sh start.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • Q
              qwaven
              last edited by

              Thanks for your reply.

              Running: /usr/local/etc/rc.d/squid.sh start I saw the following:

              
              2012/06/07 09:14:44| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
              2012/06/07 09:14:44| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
              2012/06/07 09:14:44| WARNING: You should probably remove '127.0.0.1' from the ACL named 'ext_manager'
              
              

              So I removed those (though I had not set it, I believe that is from Dansguardian)

              Does not solve my issue, though the error is now gone. As mentioned previously Squid started via command line fine. Its just when using the web portal that Squid fails to start. I tried putting the options back to the default (100M and 8k max size) and it fails to load now also… these were the only options I had altered. I'm starting to wonder if this is just an issue with the web interface and not the configuration...

              Managed to reboot the firewall and Squid starts normally with my changes intact. (the rules I removed above 127.0.0.1..etc have been put back automatically by the system also)

              Thoughts?

              Thanks

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                @qwaven:

                As mentioned previously Squid started via command line fine. Its just when using the web portal that Squid fails to start.

                This is fixed on 2.0.2 and on 2.1, apply this patch on /etc/inc/service-utils.inc and see if you can restart services on pfsense.

                https://github.com/bsdperimeter/pfsense/commit/9a1248b3a813ccfad927362e8185879cdba26925

                att,
                Marcello Coutinho

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • Q
                  qwaven
                  last edited by

                  Thanks for the info! I copied and pasted the info over the existing file (not sure if there is a better method to for this) and it appears to be working now. Tried restarting the service = worked. Tried stopping and then starting = works.

                  I believe that did it. :)

                  Cheers!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.