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

    Haproxy 100% cpu usage

    Scheduled Pinned Locked Moved Cache/Proxy
    47 Posts 7 Posters 5.9k 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.
    • L
      Luca De Andreis @stephenw10
      last edited by

      @stephenw10

      For me, yes, it's related.

      In my case a PfSense 24.03 VM (with HA Proxy 2.9.1) crashed (and therefore auto rebooted) every 3-5 days.
      With a usage load... typical of a reverse proxy in production.

      The same VM but with almost no workload, it never crashed apart from an anomalous CPU load.

      In my opinion yes, the events are correlated, but only when the reverse proxy is used above a certain threshold.

      In this regard I had also opened a ticket via "professional" support, which was closed with the response... "HAProxy is a third-party package, its update is managed in best effort" .... closed.

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

        Hmm, nothing much TAC can do beyond opening the bug report, which they did.

        We have devs looking at it now.

        L 1 Reply Last reply Reply Quote 0
        • L
          Luca De Andreis @stephenw10
          last edited by Luca De Andreis

          @stephenw10

          ahh I forgot.

          After opening the support ticket (and before downgrading to version 23.09.1) I applied the "disable zero copy forwarding" workaround.

          The CPU returned to normal on the VM with HAProxy in production... unfortunately after a few days the crash and related reboot occurred again.

          I then rolled back to 23.09.1 ​​and the system has been completely rock solid ever since.

          Luca

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

            OK the backend haproxy pkg had been updated to current (2.9.7) and looks good in testing here.

            You can upgrade it dircetly like: pkg upgrade haproxy

            Or reinstall the pfSense HAProxy package to get it.

            If this confirms the fix and doesn't introduce any new show stoppers we'll bump the package version so it appears as an upgrade for all users.

            Steve

            L 1 Reply Last reply Reply Quote 2
            • L
              Luca De Andreis @stephenw10
              last edited by

              @stephenw10

              ... upgrade to 2.9.7 in production and... for now... works fine :)

              Thanks
              Luca

              M 1 Reply Last reply Reply Quote 2
              • M
                maverick_slo @Luca De Andreis
                last edited by

                Same here, removed workaround as well
                All good last 8 hours ..

                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
                  • C
                    coreybrett
                    last edited by

                    I upgraded last night.

                    Still having same issue.

                    247da18f-2d04-4b07-8b49-93f737527cdb-image.png

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      maverick_slo @coreybrett
                      last edited by maverick_slo

                      @coreybrett you probably did not restart service after upgrade.
                      Please restart service so that new binary can be run...

                      C 1 Reply Last reply Reply Quote 1
                      • C
                        coreybrett @maverick_slo
                        last edited by

                        @maverick_slo I am pretty sure I rebooted after running the package update
                        will do so again and check it in the morning

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

                          You should see it in the stats page:

                          HAProxy version 2.9.7-5742051, released 2024/04/05
                          Statistics Report for pid 81592
                          
                          L 1 Reply Last reply Reply Quote 0
                          • L
                            Luca De Andreis @stephenw10
                            last edited by

                            @stephenw10

                            I can confirm that after this uptime:
                            f2709fec-bb14-4aea-8dd6-3ccdf6814179-immagine.png

                            HAProxy on a normal production load and without workaround applied... works fine:

                            54b362ed-7c24-442d-901b-40695bf2f239-immagine.png

                            1 Reply Last reply Reply Quote 1
                            • C
                              coreybrett
                              last edited by

                              Still having trouble with this.

                              934ff6f6-81db-4d3c-bf42-29f46ff28afa-image.png

                              Shell Output - /usr/local/sbin/haproxy -v
                              HAProxy version 2.9.7-5742051 2024/04/05 - https://haproxy.org/
                              Status: stable branch - will stop receiving fixes around Q1 2025.
                              Known bugs: http://www.haproxy.org/bugs/bugs-2.9.7.html
                              Running on: FreeBSD 15.0-CURRENT FreeBSD 15.0-CURRENT #0 plus-RELENG_24_03-n256311-e71f834dd81: Fri Apr 19 00:28:14 UTC 2024     root@freebsd:/var/jenkins/workspac
                              
                              L stephenw10S 2 Replies Last reply Reply Quote 0
                              • L
                                Luca De Andreis @coreybrett
                                last edited by

                                @coreybrett

                                strange, for me, on a production system, it works perfectly

                                3f3b0c0d-e0f9-4b18-b7b5-0043f3b20a58-immagine.png

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

                                  @coreybrett said in Haproxy 100% cpu usage:

                                  Still having trouble with this.

                                  Are you still seeing panics too?

                                  L 1 Reply Last reply Reply Quote 0
                                  • L
                                    Luca De Andreis @stephenw10
                                    last edited by

                                    @stephenw10

                                    For me the system is absolutely stable, while with HAProxy 2.9.1, it rebooted after 1-2 days of uptime

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

                                      @stephenw10 said in Haproxy 100% cpu usage:

                                      panics

                                      No panics for me, but it stops serving content and sites go down

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

                                        @coreybrett said in Haproxy 100% cpu usage:

                                        No panics for me

                                        Was it panicking in 2.9.1?

                                        C L 2 Replies Last reply Reply Quote 0
                                        • C
                                          coreybrett @stephenw10
                                          last edited by

                                          @stephenw10 no, that was never an issue for me

                                          C 1 Reply Last reply Reply Quote 0
                                          • C
                                            coreybrett @coreybrett
                                            last edited by

                                            these sites have very little traffic, but they service web hooks that must work when called

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