PHP memory problems with current version
-
Just installed a new pfBNG-devel installation on an up2date pfSense cluster.
Running version: 2.5.2
pfBlockerNG-devel: latest 3.1.0While 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
-
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 -
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,
-
@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