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

    Nginx = 504 Gateway Time-out / 502 Bad Gateway

    Scheduled Pinned Locked Moved General pfSense Questions
    7 Posts 6 Posters 2.0k 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.
    • A
      alex_ncus
      last edited by

      Upgraded to 2.4.0 and dashboard is timing out. Getting "504 Gateway Time-out" and "502 Bad Gateway" from NGINX. Tried to restart (11) web from console, and unable, console keyboard locked up, no console menu.

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

        Hi,

        I've got the same problem and posted yesterday -> https://forum.pfsense.org/index.php?topic=138166.0.

        1 Reply Last reply Reply Quote 0
        • A
          alex_ncus
          last edited by

          So did a hard reboot on pfsense then from console (16) Restart php-fpm … so far seems to be working. Web dashboard has not crashed (yet).

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

            Hi, same for me - every 50 min freezes, unable to login GUI & SSH..

            1 Reply Last reply Reply Quote 0
            • ivorI
              ivor
              last edited by

              Are any of use running pfBlockerNG? If so, it's likely related to DNSBL.

              https://forum.pfsense.org/index.php?topic=137103.0

              See this: https://forum.pfsense.org/index.php?topic=137103.msg754234#msg754234

              Need help fast? Our support is available 24/7 https://www.netgate.com/support/

              1 Reply Last reply Reply Quote 0
              • A
                ashima LAYER 8
                last edited by

                Hi,

                I had a similar problem. Got it fixed by adding following line in /boot/loader.conf and rebooting

                kern.ipc.somaxconn="4096"

                Hope this helps.

                Ashima

                1 Reply Last reply Reply Quote 0
                • P
                  pdrass
                  last edited by

                  Ashima has the fix.  I tried a bunch of stuff to get this fixed AND NONE OF IT WORKED until I patched the boot loader!

                  https://wiki.freebsd.org/SystemTuning#SYSCTL_TUNING

                  "The kern.ipc.somaxconn sysctl limits the size of the listen queue for accepting new TCP connections. The default value of 128 is typically too low for robust handling of new connections in a heavily loaded web server environment. For such environments, we recommend increasing this value to 1024 or higher. The service daemon may itself limit the listen queue size (e.g. sendmail(8), apache) but will often have a directive in its configuration file to adjust the queue size up. Larger listen queues also do a better job of fending off denial of service attacks."

                  Thank you Ashima!  I gave you a thank you bump too…if that matters, 5 gold stars, best in class, grade A <-- whatever nice things you can think of.

                  This was driving me friggin crazy!!!  :-)

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