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

    502 Bad Gateway in Web GUI at 1500+ Captive Portal Users – Need Tuning Suggestions

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 3 Posters 422 Views 3 Watching
    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.
    • stephenw10S Offline
      stephenw10 Netgate Administrator
      last edited by

      What do you see logged when that happens?

      Check the Monitoring Graphs for memory usage vs CP users.

      I would try bumping the PHP memory limit in Sys > Adv > Misc and see if that changes the time it takes to fail. Start by doubling it.

      That hardware is massively overpowered for almost all deployments. What throughput does/can it pass?

      I 1 Reply Last reply Reply Quote 0
      • I Offline
        iamsumesh @stephenw10
        last edited by iamsumesh

        @stephenw10 Thanks for the suggestion. Memory limit increased to 3072.
        This system has 10 Gbps.

        1 Reply Last reply Reply Quote 0
        • W Offline
          wazim4u @iamsumesh
          last edited by wazim4u

          @iamsumesh This issue is present in version 2.7 of pfSense. It seems the transition from IPFW to PF in the 2.7.x branch might be causing problems, or it may be related to the underlying operating system (FreeBSD). Even if you double the CPU and RAM, it will not work. Enabling the captive portal in 2.7.2 directed most traffic to CPU0, causing it to overload and crash the entire system.

          You could try upgrading to version 2.8.1 to see if it resolves the issue (I have not personally tested this yet). However, version 2.7.2 will not work; I have already reported this problem.

          https://forum.netgate.com/post/1151842

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

            This? https://redmine.pfsense.org/issues/15262

            W 1 Reply Last reply Reply Quote 0
            • W Offline
              wazim4u @stephenw10
              last edited by

              @stephenw10 yes and also informed there.

              1 Reply Last reply Reply Quote 0
              • I Offline
                iamsumesh @wazim4u
                last edited by

                @wazim4u Thanks for the suggestion. Let me try with 2.8.0.
                Version 2.8.1 is not available in https://www.pfsense.org/download/

                1 Reply Last reply Reply Quote 0
                • I Offline
                  iamsumesh
                  last edited by

                  Please advise if any tuning is required for PHP-FPM, sysctl parameters, or nginx configurations.

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

                    2.8.1 beta is available as an upgrade or available to install directly from the Net Installer.
                    https://docs.netgate.com/pfsense/en/latest/install/netinstaller.html

                    I 1 Reply Last reply Reply Quote 0
                    • I Offline
                      iamsumesh @stephenw10
                      last edited by

                      @stephenw10, Would upgrading to Plus help solve this issue?.

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

                        Unlikely. The traffic handling for CP clients is identical in Plus.

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