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

    PHP memory problems with current version

    Scheduled Pinned Locked Moved pfBlockerNG
    4 Posts 2 Posters 873 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.
    • JeGrJ
      JeGr LAYER 8 Moderator
      last edited by

      Just installed a new pfBNG-devel installation on an up2date pfSense cluster.

      Running version: 2.5.2
      pfBlockerNG-devel: latest 3.1.0

      While configuring IP Feeds, there were a few (4-5x) incidents, where pfSense threw red-flag errors like this:

      PHP ERROR: Type: 1, File: /usr/local/pkg/pfblockerng/pfblockerng.inc, Line: 4519, Message: Allowed memory size of 536870912 bytes exhausted (tried to allocate 268435464 bytes) @ 2021-11-18 10:38:56
      

      Those were not from updating feeds, that went fine. I could reproduce the memory behavior in pfBs report screen though. Reloading the report tab almost 1 in 2 reloads caused that error message to appear (instead of the UI, the error was text-only on that page). So somewhere in between, pfB seems to run out of memory for sime operation.

      Cheers

      Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

      If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

      JeGrJ 1 Reply Last reply Reply Quote 0
      • JeGrJ
        JeGr LAYER 8 Moderator @JeGr
        last edited by

        trying @BBcan177 as that was just escalated back again with two other customer installations:
        Again we have the exact same problems with above error. Just a few IP feeds added and installed, ran for a few weeks without effort, now throws that error every hour when pfBlockers Cron is running.

        Any catch as to WHY that is happening and how to work around it or solve it?`Obviously something is trying to allocate more then 512M in PHP memory?

        I'm open to debug this!

        Cheers
        \jens

        Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

        If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

        BBcan177B 1 Reply Last reply Reply Quote 0
        • BBcan177B
          BBcan177 Moderator @JeGr
          last edited by

          @jegr

          Line #4519

          https://github.com/pfsense/FreeBSD-ports/blob/devel/net/pfSense-pkg-pfBlockerNG-devel/files/usr/local/pkg/pfblockerng/pfblockerng.inc#L4519

          Is related to DHCP Leases. So probably delete that file, or clear it out? In future, this section of code can iterate each line instead of loading the whole file into memory,

          "Experience is something you don't get until just after you need it."

          Website: http://pfBlockerNG.com
          Twitter: @BBcan177  #pfBlockerNG
          Reddit: https://www.reddit.com/r/pfBlockerNG/new/

          JeGrJ 1 Reply Last reply Reply Quote 0
          • JeGrJ
            JeGr LAYER 8 Moderator @BBcan177
            last edited by

            @bbcan177 said in PHP memory problems with current version:

            Is related to DHCP Leases. So probably delete that file, or clear it out? In future, this section of code can iterate each line instead of loading the whole file into memory,

            Thanks for the pointer, will look into that!

            So probably delete that file, or clear it out?

            Don't know if that will help so much, as the customers running that are medium sized corps with A LOT of clients so even when I delete that now, they will get bigger and accumulate over time again. But I'll check if that will us buy some time for when you probably have an update ready that will parse that file a bit smoother ;)

            Is the DHCP lease file related to you parsing of the filter log to display what IP/host triggered a warning/block/rule/DNS call etc?

            Cheers mate,
            \jens

            Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

            If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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