Project

General

Profile

Actions

Bug #16223

closed

PHP Fatal error Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes)

Added by Troy R 11 days ago. Updated 11 days ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
pfBlockerNG
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
2.8.0
Affected Plus Version:
Affected Architecture:

Description

Crash report begins. Anonymous machine information:

amd64
15.0-CURRENT
FreeBSD 15.0-CURRENT #1 RELENG_2_8_0-n256081-401ec5f685b9: Wed May 21 23:53:51 UTC 2025 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_8_0-main/obj/amd64/0q9vjGjc/var/jenkins/workspace/pfSense-CE-snapshots-2_8_0-main/sources/FreeBSD-src-RE

Crash report details:

PHP Errors:
[01-Jun-2025 15:37:37 America/Chicago] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528

No FreeBSD crash data found.


Files

clipboard-202506011703-3n1pt.png (64.2 KB) clipboard-202506011703-3n1pt.png Troy R, 06/01/2025 10:03 PM
PlfBlockerNG Update.log (91.1 KB) PlfBlockerNG Update.log More Context to what might be the problem??? Troy R, 06/02/2025 01:15 AM
clipboard-202506012137-i4swt.png (54.4 KB) clipboard-202506012137-i4swt.png Troy R, 06/02/2025 02:37 AM
Actions #1

Updated by Troy R 11 days ago

It seems to be triggered by pfBlockerNG. It worked just fine in the old verison. But after updating to 2.8.0 a few days ago its been having this error a lot!

It has 32683 MiB of RAM in the box

Actions #2

Updated by Troy R 11 days ago

I had disabled PFBlocker and didn't have the error when restarting unbound.

Turned PFblocker back on. Had it update. And as soon as it was done, when I go back to the dash I see a crash notice....

```
Crash report begins. Anonymous machine information:

amd64
15.0-CURRENT
FreeBSD 15.0-CURRENT #1 RELENG_2_8_0-n256081-401ec5f685b9: Wed May 21 23:53:51 UTC 2025 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_8_0-main/obj/amd64/0q9vjGjc/var/jenkins/workspace/pfSense-CE-snapshots-2_8_0-main/sources/FreeBSD-src-RE

Crash report details:

PHP Errors:
[01-Jun-2025 17:25:09 America/Chicago] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528

No FreeBSD crash data found.

```

I also noticed in the PfBlocker log...
`Database Sanity check [ FAILED ] * These two counts should match! *
------------
Masterfile Count [ 221951 ]
Deny folder Count [ 221950 ]`

Actions #3

Updated by Troy R 11 days ago

So aftering giving stuff in ChatGPT to lookout from that error and my log PlfBlockerNG Update.log

It told me...
```
You’re loading very large lists:

BLP_Malware: 435K entries

BLP_Phishing: 190K entries

BLP_Redirect: 108K entries

Total count: likely over 1.5 million entries```
So I disabled those...

Then after a while it had me go into:
Go to:

System → Advanced → System Tunables
Then:
Add or edit:
Tunable: php_memory_limit
Value: 2048
Description: (“Increase PHP Memory”)
```

So I did that. And rebooted the router..

I then noticed in `/conf/config.xml` that I had a new thing
```
<sysctl>
<item>
<tunable>php_memory_limit</tunable>
<value>2048</value>
<descr><![CDATA[Increase PHP Memory]]></descr>
</item>
</sysctl>
```

And then I rebooted.. And nothing changed..
So it said to move it from a to <sysctl> to a <system>

So I removed that thing from the bottom from the system tunable I made.
And then moved up into the system area at the top and added in

```
...
</user>
<nextuid>2010</nextuid>
<nextgid>2000</nextgid>
<timezone>America/Chicago</timezone>
<php_memory_limit>2048</php_memory_limit>
<time-update-interval>300</time-update-interval>
<timeservers>162.159.200.123 time4.google.com time5.facebook.com time.cloudflare.com time.google.com pool.ntp.org</timeservers>
```
I put that memory limit just in that area of that system then...

Then I ran `/etc/rc.php_ini_setup` so it regens the php config..

And now when I run
`php -i | grep memory_limit`
I get
`memory_limit => 2048M => 2048M`

Now to see if I still have that error if I try again with my pfblocker update...

Actions #4

Updated by Troy R 11 days ago

After doing all that I now learned..

System > Advanced > Miscellaneous > PHP Settings is exactly what sets the <php_memory_limit> tag inside the <system> block of your config.xml

So the issue that looked like an kea2unbound issue. That this error it made should maybe to editing to say to go into your System > Advanced > Miscellaneous and raise the PHP Memmory Limit ....

Actions #5

Updated by Steve Wheeler 11 days ago

  • Project changed from pfSense to pfSense Packages
  • Category changed from DNS Resolver to pfBlockerNG
  • Priority changed from Very High to Normal
  • Release Notes deleted (Default)

What you should be doing here is setting pfBlockerNG to use Unbound mode if you are loading a lot of large lists.

Actions #6

Updated by Jim Pingle 11 days ago

  • Status changed from New to Duplicate

Duplicate of #16217

Actions

Also available in: Atom PDF

OSZAR »