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

pfsense 2.5.2 slowly leaking memory

Scheduled Pinned Locked Moved General pfSense Questions
44 Posts 11 Posters 8.1k 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.
  • S
    SteveITS Galactic Empire @murzik
    last edited by SteveITS Sep 23, 2021, 6:13 PM Sep 23, 2021, 5:14 PM

    @murzik And just to be clear, you've patched for the pcscd issue and/or that service is stopped (Status/Services)? We do have one 2.5.2 and its graphs are literally flat today except at 6:30 this morning when free memory increased 1%. That's when Suricata updates.

    Do you have pfBlocker's DNSBL active, or any other packages?

    Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
    When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
    Upvote 👍 helpful posts!

    J 1 Reply Last reply Sep 23, 2021, 5:54 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @SteveITS
      last edited by Sep 23, 2021, 5:54 PM

      You can see exactly when I turned off pcscd a couple of days ago.. I thought I had stopped it, but it was running again..

      graph.jpg

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.8, 24.11

      M 1 Reply Last reply Sep 23, 2021, 8:24 PM Reply Quote 0
      • M
        murzik @johnpoz
        last edited by Sep 23, 2021, 8:24 PM

        Yes, I've patched pcscd. Do have pfblocker, snort, squid installed. But I had all the same packages for years.

        S 1 Reply Last reply Sep 23, 2021, 8:56 PM Reply Quote 0
        • S
          SteveITS Galactic Empire @murzik
          last edited by Sep 23, 2021, 8:56 PM

          @murzik I don't use DNSBL or Squid but you might read this recent post about pfBlocker.

          You could try looking at Diagnostics/System Activity, or run "top -o res" (sort by memory) at a command line, and see what is using the memory. I get:

          PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
          81511 root         10  20    0   381M   337M nanslp   0 586:13   1.49% suricata
          89847 root          1  52    0   135M    47M accept   0   0:29   0.00% php-fpm
          93096 root          1  21    0   133M    46M accept   0   0:13   0.29% php-fpm
          11372 root          1  52    0   132M    45M accept   1   0:03   0.00% php-fpm
          338 root          1  52    0   133M    45M accept   0   0:11   0.00% php-fpm
          337 root          1  52    0   132M    44M accept   1   0:34   0.00% php-fpm
          26574 root          1  52    0    59M    38M piperd   1   0:00   0.00% php_pfb
          73546 unbound       4  20    0    68M    32M kqread   1   1:17   0.00% unbound
          336 root          1  20    0   102M    25M kqread   0   1:25   0.00% php-fpm
          37003 root          1  20    0    29M  9648K kqread   2   0:07   0.05% nginx
          36796 root          1  20    0    29M  9644K kqread   3   0:03   0.00% nginx
          ...
          

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

          M 1 Reply Last reply Sep 27, 2021, 3:20 PM Reply Quote 0
          • M
            murzik @SteveITS
            last edited by murzik Sep 27, 2021, 3:22 PM Sep 27, 2021, 3:20 PM

            @steveits
            The problem not what application uses the most memory, but that memory usage grow over the time. I have to reboot every other day.
            c09cf59b-c10d-41f3-bed3-3b8c8a9adde6-image.png
            21ba4b38-fff9-492b-b1b8-87287c609b3d-image.png

            Also memory usage displayed with "top -o res" does not account for all memory used memory shown in GUI.
            Stopping PF blocker does not free memory.

            S G S 3 Replies Last reply Sep 27, 2021, 3:32 PM Reply Quote 0
            • S
              SteveITS Galactic Empire @murzik
              last edited by Sep 27, 2021, 3:32 PM

              @murzik said in pfsense 2.5.2 slowly leaking memory:

              memory usage grow over the time

              I was assuming there was a particular process increasing in size. If it's multiple processes that would make it a bit harder to diagnose, perhaps just watch over time. But if it isn't happening to everyone then it seems like it's not a generic FreeBSD/pfSense problem...

              That said unbound on the two routers I just looked at is much smaller than 700 MB, around 30-50 MB. We don't have pfBlocker's DNSBL running though.

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote 👍 helpful posts!

              1 Reply Last reply Reply Quote 0
              • G
                Gertjan @murzik
                last edited by Sep 28, 2021, 8:34 AM

                @murzik

                pfBlockerNG, the DNSBL part : you're using the python mode ?

                My unbound process is one of the biggest (but not the biggest) process in my system, but stays at around 100 Mbytes :

                96339 unbound       2  20    0   101M    95M kqread   0   0:03   0.37% unbound
                

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                M 1 Reply Last reply Sep 28, 2021, 12:30 PM Reply Quote 0
                • S
                  stephenw10 Netgate Administrator @murzik
                  last edited by Sep 28, 2021, 11:50 AM

                  @murzik said in pfsense 2.5.2 slowly leaking memory:

                  I have to reboot every other day.

                  What happens if you do not reboot it?

                  That is something leaking quite fast if you are using 8GB in 2 days.

                  Steve

                  M 1 Reply Last reply Sep 28, 2021, 12:27 PM Reply Quote 0
                  • M
                    murzik @stephenw10
                    last edited by Sep 28, 2021, 12:27 PM

                    @stephenw10
                    If I do not reboot, pfsense will use up all the memory and swap and crash.

                    S 1 Reply Last reply Sep 28, 2021, 3:01 PM Reply Quote 0
                    • M
                      murzik @Gertjan
                      last edited by Sep 28, 2021, 12:30 PM

                      @gertja
                      Yes, I do use DNSBL in python mode. But I've been using it in python mode since it become available without any issues.... Also disabling DNSBL, restarting unbond, snort etc, does not free any memory....

                      1 Reply Last reply Reply Quote 0
                      • S
                        SteveITS Galactic Empire @murzik
                        last edited by Sep 28, 2021, 3:01 PM

                        @murzik said in pfsense 2.5.2 slowly leaking memory:

                        pfsense will use up all the memory and swap and crash

                        We can't see your process list...you'll need to tell us which processes are using up the memory.

                        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                        Upvote 👍 helpful posts!

                        M 1 Reply Last reply Sep 28, 2021, 3:22 PM Reply Quote 0
                        • M
                          murzik @SteveITS
                          last edited by murzik Sep 28, 2021, 3:24 PM Sep 28, 2021, 3:22 PM

                          @steveits Unfortunately I am not able to tell. When system crashes it is too late to check. However, I am starting to suspect that ntopng could be the problem. I remoted ntopng yesterday, so far memory usage stays around 30% . Will see in few days.

                          G 1 Reply Last reply Sep 29, 2021, 7:59 AM Reply Quote 0
                          • G
                            Gertjan @murzik
                            last edited by Sep 29, 2021, 7:59 AM

                            @murzik said in pfsense 2.5.2 slowly leaking memory:

                            ntopng

                            Aha !
                            You to forget to mention that you were using the big resource hog, the beast that should be set up carefully, and has to be managed 24/24h.
                            Tools like ntopng should not be left alone, as it files up files rapidly.
                            Most 'space' issues are not the RAM that starts too be consumed, but your entire disk space.
                            The result is the same : booooom.
                            With a full RAM and swap : the system goes down - but can restart it without issues. That is, if the file system wasn't corrupted when doing the unplanned system reboot.
                            A full file system : your system won't boot any more.

                            No "help me" PM's please. Use the forum, the community will thank you.
                            Edit : and where are the logs ??

                            M 1 Reply Last reply Sep 29, 2021, 12:21 PM Reply Quote 0
                            • M
                              murzik @Gertjan
                              last edited by Sep 29, 2021, 12:21 PM

                              @gertjan
                              Apparently ntopng was not the cause. As of right now
                              cc13b462-bdef-434b-a339-52583815c6f0-image.png

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Sep 29, 2021, 3:05 PM

                                If it doesn't show in the process list it's probably something in kernel like a driver.

                                Are all the affected systems running on the same hardware?

                                Steve

                                1 Reply Last reply Reply Quote 0
                                44 out of 44
                                • First post
                                  44/44
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                  This community forum collects and processes your personal information.
                                  consent.not_received