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

    Squid with diskd won't start

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 3 Posters 1.4k 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.
    • A
      aboehme
      last edited by

      Hi there,

      i am running pfsense 2.1.2 64Bit with squid3 package (not more packages). The last weeks there were no problems, but suddenly squid won't work anymore. The cache.log says, there is no space left on my device, but there is enough. I've tried deleting the whole cache and starting squid -z to rebuild the cache, without success. Switching to aufs cache system works for the moment, but i still want to use diskd.
      I've read about about the following kernel options:

      kernel.msgmni = 64
      kernel.msgmax = 16384

      Will they help? Does anyone got the same error?

      Thats what the cache.log says:

      2014/05/04 00:02:28| Starting Squid Cache version 3.1.22 for amd64-portbld-freebsd8.3…
      2014/05/04 00:02:28| Process ID 64386
      2014/05/04 00:02:28| With 11095 file descriptors available
      2014/05/04 00:02:28| Initializing IP Cache...
      2014/05/04 00:02:28| DNS Socket created at [::], FD 11
      2014/05/04 00:02:28| DNS Socket created at 0.0.0.0, FD 12
      2014/05/04 00:02:28| Adding domain localdomain from /etc/resolv.conf
      2014/05/04 00:02:28| Adding nameserver 127.0.0.1 from /etc/resolv.conf
      2014/05/04 00:02:28| User-Agent logging is disabled.
      2014/05/04 00:02:28| Referer logging is disabled.
      2014/05/04 00:02:29| Unlinkd pipe opened on FD 18
      2014/05/04 00:02:29| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
      2014/05/04 00:02:29| Store logging disabled
      2014/05/04 00:02:29| Swap maxSize 10240000 + 786432 KB, estimated 848187 objects
      2014/05/04 00:02:29| Target number of buckets: 42409
      2014/05/04 00:02:29| Using 65536 Store buckets
      2014/05/04 00:02:29| Max Mem  size: 786432 KB
      2014/05/04 00:02:29| Max Swap size: 10240000 KB
      2014/05/04 00:02:29| storeDiskdInit: msgget: (28) No space left on device
      FATAL: msgget failed
      Squid Cache (Version 3.1.22): Terminated abnormally.
      CPU Usage: 0.013 seconds = 0.013 user + 0.000 sys
      Maximum Resident Size: 5632 KB
      Page faults with physical i/o: 0

      Thanks for your help!

      1 Reply Last reply Reply Quote 0
      • D
        Dvdis
        last edited by

        I'm having the same problem.

        I already removed and recreated the cache directory, but not resolved.

        I use diskd configuration and do not intend to change.

        My disk space:
        Filesystem    Size    Used  Avail Capacity  Mounted on
        /dev/ad0s1a    16G    1.2G    13G    8%    /
        devfs                1.0k    1.0k        0B  100%    /dev
        /dev/md0        3.6M    62k      3.3M    2%    /var/run
        devfs                1.0k    1.0k        0B  100%    /var/dhcpd/dev

        1 Reply Last reply Reply Quote 0
        • D
          djzort
          last edited by

          i have just come across this problem and solved it.

          as per http://wiki.squid-cache.org/Features/DiskDaemon one of these values arent compiled in with the right value for diskd

          just go

          echo "kern.ipc.msgssz=64" >> /boot/loader.conf.local

          (note the >> so you dont wipe other stuff you care about)

          then reboot.

          run this to verify, you should see diskd running

          ps ax | grep diskd
          42919  ??  S      0:00.03 diskd 43539460 43539461 43539462

          squid will then run with diskd.

          dear pfsense maintainers, perhaps this value should be up'd by default at compile time as per the squid wiki?

          1 Reply Last reply Reply Quote 0
          • D
            djzort
            last edited by

            further to my last post, it seems that more tweaking is needed

            for a squid config with the "Local Cache/Level 1 subdirectories" set to 64, these are the sysctls which worked for me

            
            kern.ipc.msgseg: 512
            kern.ipc.msgssz: 64
            kern.ipc.msgtql: 8192
            kern.ipc.msgmnb: 8192
            kern.ipc.msgmni: 128
            kern.ipc.msgmax: 32768
            
            

            some are defaults so you just need to add the following to /boot/loader.conf.local

            
            kern.ipc.msgssz=64
            kern.ipc.msgmni=128
            kern.ipc.msgtql=8192
            
            

            These are based on this page http://wiki.squid-cache.org/Features/DiskDaemon#FreeBSD

            Here are the formulas if you want to adjust the L1 value

            L1=xxx
            msgmnb=8192
            msgni=L1*2
            msgseg=512
            msgssz=64
            msgtql=L1*75 # i rounded this up to 8192
            
            

            Read the squid wiki page for full explanations.

            1 Reply Last reply Reply Quote 0
            • D
              djzort
              last edited by

              this config ran for about a week, then the same "out of space' error occurred again.

              something is screwy with diskd vs freebsd

              for now ive gone back to the ufs option, but im sure i will be inspired to fiddle again soon

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