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

    Squid went mad -> 100% cpu -> persists after pack reinstalation -> newbie hangs

    pfSense Packages
    4
    7
    6.0k
    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.
    • T
      tlopes
      last edited by

      Hi all, this is my first post so let me say hello to all users and developers, I hope to have a long stay here, now that I started to use it.

      I've been reading about pfsense for years but never really used it myself, just saw it working at friends homes. Now I'm builinding my own lan house / gaming center / computer repair shop and I want it to build a impeccable local network for 20/30 machines. As I want to improve my SOHO network skills I choose pfsense as router, firewall and internet gateway on regular desktop hardware. I only have a ADSL line with 20Mbit/1Mbit so keeping the gaming center users playing FPS games with low lag, while having windows pc's being repaired at the computer lab (some of them full of trojans or downloading massive updates for microsoft products after a fresh install ) and still using p2p with the bandwith that it's left, it's not an easy task.

      I want to set up QoS, multiple LAN's, VPN server and a proxy server caching everything possible. Pfsense 1.2 + Squid + ntop (and maybe even more packages) seems what I need while i wait for a stable 2.0. I set up a test machine with a pentium III 600, 128 ram, 320gb IDE HDD and 3 100mbit nic's before I'm comfortable to port it for a production machine with dual core, 4gb of ram and multiple gigabit ports.

      I set ntop to plan my QoS needs and squid+lightsquid to see how it runs (still haven't messed with squid config files for caching updates and flash video sites, only a few options with the GUI) It worked great for a week, with some limitations from the hardware being noticed while fetching big cached files from the hdd or downloading at full speed. I kept QoS (with the squid changes described here in the forum) for last, has it seems the most critic and tricky part.

      But today, after checking the logs I saw that cpu was 100% for 10 hours starting at 1am, while activity was low. With my newbie knowledge of command line, I ran top and saw squid process eating as much cpu it could. I killed the process, but it restarted immediately. Reboot didn't worked too. So i decided to uninstall all the packages. Everything worked great. Then I installed squid only, and cpu went 100% again.  I could try to reinstall pfsense, or upgrade to 1.3, but if i fix it, it could just happen again after running for a week straight. I would like to know what happened so I ask for some direction on troubleshooting and resolving this problem. It would be great if the more experienced users could help.

      1 Reply Last reply Reply Quote 0
      • V
        Valhingen
        last edited by

        Confirmed. I'm having the same problem.

        Everything went smoothly before I installed my USB Wifi Card as OPT for multi LAN.
        After installing second LAN (OPT1, Wifi USB), suddenly my squid went mad. It keeps accessing my installed Hard Disk (HDD LED blinks non-stop). I guess this is why squid eats 100% CPU process.
        I've tried uninstalling and reinstalling squid. I've also tried changing squid package to squid3. But the problem persists.
        I guess this happens when you setup multiple LAN on pfsense with squid.

        My configuration:
        pfsense 1.2.3, squid/squid3, lightsquid, rate.
        My Hardware:
        AMD Duron 700, 512MB RAM, 40GB Old seagate HD, 2 Realtek 8139 NIC PCI Card (WAN and LAN), D-Link DWA-110 Wireless G USB Adapter (OPT)

        1 Reply Last reply Reply Quote 0
        • M
          mhab12
          last edited by

          I'm not sure the common link between the two of you having issues, but we have had squid bound to two LAN interfaces for a couple of years now in production with no problems at all.  Currently, we're on 1.2.3 with Squid 2.7.8_1 - dashboard and auto-config-backup are the only other installed packages on our system.

          1 Reply Last reply Reply Quote 0
          • T
            tlopes
            last edited by

            hi guys, thanks for caring.

            I had this problem before I installed the opt1 interface. So it's not related to multiple LAN. In the next few days I'm going to migrate to a new desktop, maybe squid needa more that 128ram. (but it did work for a week)

            1 Reply Last reply Reply Quote 0
            • C
              chudy
              last edited by

              you can always look at you cache.log at /var/squid/log/cache.log see if what errors you have in there. I've seen some bugs on pfsense squid package.
              in most cases something happen about your cache dir and swap state. you may attach your cache.log if its below 250kb.

              1 Reply Last reply Reply Quote 0
              • T
                tlopes
                last edited by

                hey chudy, thanks for the tip. that's the kind of help I need.  I see some strange things in the log, squid just goes on a loop restarting itself every second or so. It might be some error while parsing the conf file. So I probably changed something in the gui that caused it to go nuts. I don't recall what I did so, i'll just start a new fresh install.

                But digging the logs is a great way to troubleshoot.
                Is there a way to see the log being written in real time?

                1 Reply Last reply Reply Quote 0
                • C
                  chudy
                  last edited by

                  run at your console or putty via ssh

                  tail -fn100 /var/squid/log/cache.log
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.