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

    Is it possible to configure php-fpm to listen on localhost:9000 (IP:PORT) instead of socket in Pfsense?

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    24 Posts 5 Posters 2.3k 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.
    • B
      Bablu Kare
      last edited by

      Re: 502 Bad Gateway (nginx) after Update to 2.3

      1 Reply Last reply Reply Quote 0
      • B
        Bablu Kare
        last edited by

        If yes, then please share the configuration guide.

        1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan
          last edited by

          That would be No.
          You're referencing to an old thread mentioning even older software - versions that do not exists anymore.

          It's "2.4.4" these days.

          Btw : the PHP config file isn't hard to find, if you are willing to dive under the hood.
          This file is generated and recreated by the pfSense GUI, but you can force it to switch form a "socket" to an IP:port.
          The nginx web server used for, among other, the GUI, will stop to work, of course.

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

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Why would you want to do this - do you think its fix for that thread from 3 years ago?

            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

            1 Reply Last reply Reply Quote 0
            • B
              Bablu Kare
              last edited by Bablu Kare

              Actually, I am getting 502 bad gateway error frequently and at the latest version (2.4.4).

              I explored around it and found IP:Port work better than the socket that why I wanted to give a try with this but no luck.

              When I switch socket to ip:port it stops working and getting socket not found error.

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                Not sure where you would get the idea that ip:port works better than socket.. But ok.. Explains why you might want to try it out.. But if your getting 502 errors.. I find it hard to believe switching to ip:port would fix it.

                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

                B 1 Reply Last reply Reply Quote 0
                • B
                  Bablu Kare
                  last edited by

                  What should I do to resolve 502 error, any suggestion?
                  I am using the latest version of Pfsense.

                  1 Reply Last reply Reply Quote 0
                  • B
                    Bablu Kare
                    last edited by

                    I loved and would like to use Pfsense but 502 error and squid cache are frustrating me. as I am not able to completely disable squid cache for both HDD and RAM.

                    Please help me in resolving these issues.

                    If you have a commercial version of this then please let me know.

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      Bablu Kare @Bablu Kare
                      last edited by

                      @bablu-kare If commercial version resolves both the issues.

                      1 Reply Last reply Reply Quote 0
                      • B
                        Bablu Kare @johnpoz
                        last edited by

                        @johnpoz What should I do to resolve 502 error, please suggest?

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          Most likely cause is that you are running your system out of RAM. You have not provided enough information to speculate about how/why that is happening.

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          B 1 Reply Last reply Reply Quote 0
                          • GertjanG
                            Gertjan
                            last edited by

                            Just a ques : remove squid and your "502" are gone, right ?

                            I'm running a plain vanilla pfSense 2.4.4, which means you and I have exactly the same software, and I never ever saw something that look like a 502.
                            Btw : your settings and mine are probably different.

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

                            B 1 Reply Last reply Reply Quote 0
                            • B
                              Bablu Kare @jimp
                              last edited by

                              @jimp System has 16 GB RAM, with I5 ( 4core) CPU.

                              I think it's happening because of heavy load maybe, as I am using Pfsense for 80 Users.

                              Pfsense works fine for 1-2 hour after restarting PHP-PFM and after that throw 502 error in the browser when users access any sites.

                              1 Reply Last reply Reply Quote 0
                              • GertjanG
                                Gertjan
                                last edited by

                                I do remember something like this : squid is a mono core program. Better check this.

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

                                B 1 Reply Last reply Reply Quote 0
                                • B
                                  Bablu Kare @Gertjan
                                  last edited by

                                  @gertjan I think, that is working fine for you because you are using that for the single machine.

                                  GertjanG 1 Reply Last reply Reply Quote 0
                                  • GertjanG
                                    Gertjan @Bablu Kare
                                    last edited by

                                    @bablu-kare said in Is it possible to configure php-fpm to listen on localhost:9000 (IP:PORT) instead of socket in Pfsense?:

                                    @gertjan I think, that is working fine for you because you are using that for the single machine.

                                    16 Gb mem - 'old' Pentium quad core ..... (you're right, it's a single machine) 50 users max (captive portal users and company employees) and : no squid.

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

                                    B 1 Reply Last reply Reply Quote 0
                                    • B
                                      Bablu Kare @Gertjan
                                      last edited by

                                      @gertjan Please suggest what and where should I check, because I've tried my level best to resolve this issue, but no luck.

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        Bablu Kare @Gertjan
                                        last edited by

                                        @gertjan What should I do to use it for 80+ users?

                                        Is there any commercial version of it?

                                        1 Reply Last reply Reply Quote 0
                                        • jimpJ
                                          jimp Rebel Alliance Developer Netgate
                                          last edited by

                                          16GB RAM should be OK unless the squid settings are set badly. You still haven't provided any details about what you're doing with squid specifically, or any other services on the firewall.

                                          If you're using DNS over TLS, for example, you could be hitting a memory leak in Unbound. Or squid could be eating all the RAM. You need to collect more information about the state of the system when it's failing.

                                          For example, connect over ssh and watch the output of top -aSH and see what is using the most resources.

                                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                          Need help fast? Netgate Global Support!

                                          Do not Chat/PM for help!

                                          B 1 Reply Last reply Reply Quote 0
                                          • GertjanG
                                            Gertjan
                                            last edited by

                                            Added to what @jimp said : if you see one ore more of the "php-fpm" eating up all processor(s) time, or your memory, your "502" issue is explained.

                                            As said : to isolate the problem : ditch squid for the time being.
                                            If, after some time, - 2 days or so, everything stays normal, you know where to focus your search.

                                            Btw : I'm mentioning "php" here, but it could be anything. More details are needed to say something more precis.

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

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