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

    Config history not pruning on HA pair, has 3400 files

    Scheduled Pinned Locked Moved General pfSense Questions
    13 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.
    • S
      SteveITS Galactic Empire @SteveITS
      last edited by

      I logged in to my home router which has 76 files:

      ]/cf/conf/backup: ls -l |wc
            76     677    5036
      

      ...dating back to March 5:

      -rw-r--r--  1 root wheel 133456 Mar  5 21:01 config-1741230074.xml
      -rw-r--r--  1 root wheel 134150 Mar  5 21:06 config-1741230100.xml
      -rw-r--r--  1 root wheel 134149 Mar  5 21:03 config-1741230191.xml
      ...
      

      Similarly, opening the configuration history page deletes all but 30, though (presumably) since there aren't 1000+ it doesn't time out and does actually delete all the old ones.

      So whatever the problem is, is not related to HA.

      On my home router the times are suspiciously similar to the last boot ("Mar 6 08:02 dmesg.boot", 89 days) however the HA pair was rebooted a month ago.

      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 1
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Yup that's a known bug: https://redmine.pfsense.org/issues/15994

        It's fixed in 25.03.

        S 1 Reply Last reply Reply Quote 1
        • S
          SteveITS Galactic Empire @stephenw10
          last edited by

          @stephenw10 ah I see. And โ€œAffected Plus Version set to 24.03โ€ explains why it went back so far. Though we would have updated both the same day. Maybe someone opened the config history on one.

          3400 is a bit alarming of course. Looks like a 2-3 sync/write amplification on our backup router for some reason. Not that it does much else writing. Itโ€™s just a bit ironic because pfBlocker has has issues syncing changes to the backup router outside of cron.

          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
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Yup they can really stack up!

            JeGrJ 1 Reply Last reply Reply Quote 0
            • S SteveITS referenced this topic on
            • JeGrJ
              JeGr LAYER 8 Moderator @stephenw10
              last edited by JeGr

              @stephenw10 Also wanted to add that it will stack even immensly higher on a HA Pair with pfBlockerNG enabled as PFB unnecessarily does a config write every hour it gets triggered even when doing absolutely nothing. That should really be fixed! as it will trigger a ha sync run (without reason) and even triggers double the amount of config writes on the standby node (one from pfB itself on that node, one from the unnecessary sync operation). We had nodes with over 20k configs :((

              See one of the posts from here:
              https://forum.netgate.com/topic/188036/list-of-problems-bugs-in-ha-carp-setups/8

              Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

              If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

              S 1 Reply Last reply Reply Quote 1
              • S
                SteveITS Galactic Empire @JeGr
                last edited by

                @JeGr said in Config history not pruning on HA pair, has 3400 files:

                PFB unnecessarily does a config write every hour

                I think that's this "new" issue from 2022, do you have DNSBL disabled? We do, in our data center.

                https://forum.netgate.com/topic/174231/pfblockerng-fills-pfsense-config-history
                https://redmine.pfsense.org/issues/14409

                There have been other similar bugs in pfB in the past, I believe.

                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!

                JeGrJ 1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  The patch to fix this applies cleanly to 24.11 and works for me here.

                  mr165.diff

                  I don't have any instances that have a stack of backups right now though. If you can test let me know.

                  S 2 Replies Last reply Reply Quote 1
                  • S
                    SteveITS Galactic Empire @stephenw10
                    last edited by

                    @stephenw10 I applied the patch on our secondary and after making a change on primary it removed a couple dozen extra files since my earlier posts.

                    I think the extra config writes on the backup router were because of this pfBlocker bug where it doesn't bother syncing changes to the backup unless one manually runs a force reload. So I think the backup router was adding a list and removing a (defunct) list every time the cron jobs ran (the one on primary, and the one on secondary).

                    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 1
                    • S
                      SteveITS Galactic Empire @stephenw10
                      last edited by SteveITS

                      @stephenw10 said in Config history not pruning on HA pair, has 3400 files:

                      stack of backups

                      (cleaning up my email for the day) You can actually generate them...install pfBlocker, don't enable DNSBL, and an hourly cron should update at least its <time> value even if nothing else is selected. Then just wait a few hours, or a day, or so.

                      And, the patch worked on our primary router also.

                      On most others, we have been enabling DNSBL just to have the DoH blocking, so at least the config spam isn't nearly as bad on them. And/or have the pfB update set to like 12 or 24 hours.

                      Our HA units are also using SSDs...5-10 GB of config files could eat up most of the space on an eMMC. (edit: though I suppose it is compressed)

                      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
                      • S SteveITS referenced this topic on
                      • JeGrJ
                        JeGr LAYER 8 Moderator @SteveITS
                        last edited by

                        @SteveITS said in Config history not pruning on HA pair, has 3400 files:

                        I think that's this "new" issue from 2022, do you have DNSBL disabled? We do, in our data center.

                        Yes, no DNSBL at all. Just IP Block/Allowlists getting updated. And as these do no changes at all - as the content of the files is not written into the XML file and the Alias is a file on disk - it just creates useless empty entries as per my list of bugs in the pfB Forum.

                        @stephenw10 said in Config history not pruning on HA pair, has 3400 files:

                        I don't have any instances that have a stack of backups right now though. If you can test let me know.

                        I'll give it a try, nearly all our clusters have that problem.

                        Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

                        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                        JeGrJ 1 Reply Last reply Reply Quote 1
                        • JeGrJ
                          JeGr LAYER 8 Moderator @JeGr
                          last edited by

                          @JeGr said in Config history not pruning on HA pair, has 3400 files:

                          I'll give it a try, nearly all our clusters have that problem.

                          Up until now, the config files stayed below the 100 versions we configured, so not much to report for "going over". I also installed a second patch from the ticket about pfBlockerNG writing useless empty changes and that seemed to work very well - no empty "writing DNSBL changes" anymore, so no hourly hits that would drive the version count up. I'll have to wait for the next few changes to bring it up to a hundred to check if it goes over again, but right now it looks good.

                          Cheers

                          Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

                          If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                          1 Reply Last reply Reply Quote 1
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            Great. Thanks for testing! ๐Ÿ‘

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