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

    Php out of memory errors on 2.1 development amd64 - bogonsv6 and pfblocker

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    13 Posts 7 Posters 5.2k 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.
    • I
      iamzam
      last edited by

      I have increased that a few times already, right now i am at 100000000 (100 million) and i still get the same error.

      Do you know if there is something i need to do after increasing this?  reboot?

      1 Reply Last reply Reply Quote 0
      • chpalmerC
        chpalmer
        last edited by

        Mar 1 20:39:26 php: : The command '/sbin/pfctl -o basic -f /tmp/rules.debug' returned exit code '1', the output was '/tmp/rules.debug:147: cannot define table bogonsv6: Cannot allocate memory pfctl: Syntax error in config file: pf rules not loaded'
        Mar 1 20:39:28 php: : New alert found: There were error(s) loading the rules: /tmp/rules.debug:147: cannot define table bogonsv6: Cannot allocate memory pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [147]: table <bogonsv6>persist file "/etc/bogonsv6"
        Mar 1 20:39:28 php: : There were error(s) loading the rules: /tmp/rules.debug:147: cannot define table bogonsv6: Cannot allocate memory pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [147]: table <bogonsv6>persist file "/etc/bogonsv6"
        Mar 1 20:39:35 php: : The command '/sbin/pfctl -o basic -f /tmp/rules.debug' returned exit code '1', the output was '/tmp/rules.debug:147: cannot define table bogonsv6: Cannot allocate memory pfctl: Syntax error in config file: pf rules not loaded'
        Mar 1 20:39:38 php: : New alert found: There were error(s) loading the rules: /tmp/rules.debug:147: cannot define table bogonsv6: Cannot allocate memory pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [147]: table <bogonsv6>persist file "/etc/bogonsv6"
        Mar 1 20:39:38 php: : There were error(s) loading the rules: /tmp/rules.debug:147: cannot define table bogonsv6: Cannot allocate memory pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [147]: table <bogonsv6>persist file "/etc/bogonsv6"

        Related?</bogonsv6></bogonsv6></bogonsv6></bogonsv6>

        Triggering snowflakes one by one..
        Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          Yes, the same error pfBlocker gets but now in bogonsv6 list. Maybe a huge list too.

          I'm not testing 2.1 yet but you can try to monitor memory usage while applying rules to see how much RAM it loads before error.

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • I
            iamzam
            last edited by

            I looked at both of my php.ini files, ( i have a /usr/local/lib/php.ini and a /usr/local/etc/php.ini ) and there was no memory_limit key but there was a suhosin.memory_limit = 512435456

            According to http://redmine.pfsense.org/issues/2214 suhosin was turned off temporarily in 2.1 so i'm not sure if the suhosin.memory_limit would apply.

            In any event, a reboot fixed my problem, so apparently changing 'Firewall Maximum Table Entries' needs a reboot to take effect…

            I created a phpinfo() script and loaded it into /usr/local/www and it shows 128M, but the 'suhosin.memory_limit = 512435456' equates to around 488M according to my calculator and http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes so perhaps the default of 128M is in effect since /etc/rc.php_ini_setup doesn't set any 'memory_limit'.

            1 Reply Last reply Reply Quote 0
            • E
              Efonnes
              last edited by

              None of the log messages you have posted have anything to do with PHP running out of memory.  Those are only messages about the external commands that the PHP script executed.

              1 Reply Last reply Reply Quote 0
              • I
                iamzam
                last edited by

                ok, thanks, that make sense.

                So can you verify that changing firewall maximum table entries needs a reboot?  Everywhere i find that references this change doesn't mention rebooting, and changing that variable definitely wasn't working until i rebooted…

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

                  It's a chicken and egg problem.

                  You have to load the ruleset to increase the table size, and you have to increase the table size to load the ruleset.

                  Delete or deactivate some tables, fix the table size, save/apply, then add them back.

                  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!

                  1 Reply Last reply Reply Quote 0
                  • Z
                    zandr
                    last edited by

                    I'm seeing the same issue as chpalmer. It's just 2.1, nothing to do with pfblocker, as I haven't installed that.

                    Turning off ipv6 everywhere doesn't help, I actually had to turn off bogon filtering everywhere to make the error go away. (not my first choice, but probably not a big deal)

                    1 Reply Last reply Reply Quote 0
                    • D
                      databeestje
                      last edited by

                      this is not as much a problem with 2.1 perse. It's pf that can't load the ruleset.

                      I think there is some contemplation how to go about this.

                      I've had no issues with pfctl running out of memory related to anything remotely IPv6 related.

                      1 Reply Last reply Reply Quote 0
                      • Z
                        zandr
                        last edited by

                        I'm inclined to believe it's not actually memory issue, since I'm using 3% of the 4GB in this box. (amd64)

                        I think it's a bug of some sort, there was a similar issue back in October in this thread: http://forum.pfsense.org/index.php/topic,40953.msg211475.html#msg211475

                        EDIT: And /etc/bogonsv6 is actually empty.

                        1 Reply Last reply Reply Quote 0
                        • D
                          databeestje
                          last edited by

                          that thread is entirely unrelated to this.

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