PHP Fatal error: Allowed memory size exhausted in /usr/local/bin/kea2unbound
-
Hi,
after upgrading to version 2.8.1 I'm seeing regular crash reports in the pfSense UI.
Crash report begins. Anonymous machine information: amd64 15.0-CURRENT FreeBSD 15.0-CURRENT #21 RELENG_2_8_1-n256095-47c932dcc0e9: Thu Aug 28 16:27:48 UTC 2025 root@pfsense-build-release-amd64-1.eng.atx.netgate.com:/var/jenkins/workspace/pfSense-CE-snapshots-2_8_1-main/obj/amd64/AupY3aTL/var/jenkins/workspace/pfSense-CE- Crash report details PHP Errors: [04-Nov-2025 18:39:05 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:39:39 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:40:13 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:40:48 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:41:21 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:41:56 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:42:30 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:43:04 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:43:38 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:44:12 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:44:47 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:45:21 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:45:55 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:46:29 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:47:03 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:47:37 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:48:12 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:48:46 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:49:20 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:49:54 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:50:28 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:51:02 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:51:36 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:52:10 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:52:45 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:53:19 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:53:53 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:54:27 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:55:01 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:55:29 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:56:10 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:56:44 Europe/Berlin] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 [04-Nov-2025 18:57:18 Europe/Berlin] 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 have searched the forum and found a similar issue reported in the previous version of pfSense.
Related topics:- https://forum.netgate.com/post/1216303
- https://forum.netgate.com/topic/198381
- https://forum.netgate.com/topic/198764
The general solution in these topics is to use python mode in pfBlocker DNSBL.
Unfortunately this is not helping in my case
I already have DNSBL Mode set toUnbound python mode
and Python Module in DNS Recorder is enabled as well.Investigation
Process that is executed:
[2.8.1-RELEASE][admin@pfSense.local.lan]/root: ps aux | grep kea2unbound root 7072 0.0 0.0 14644 3096 - S 18:44 0:00.00 /bin/sh /conf/kea4_scripts.d/kea2unbound.sh lease4_update root 7116 0.0 0.2 62232 38196 - S 18:44 0:00.04 php /usr/local/bin/kea2unbound --kea-conf /usr/local/etc/kea/kea-dhcp4.conf --unbound-conf /var/unbound/unbound.conf --include-file /var/unbound/leases/leases4.conf sync --subnet-id 1 root 7821 0.0 0.0 14076 2692 0 S+ 18:44 0:00.00 grep kea2unboundreferenced files from kea2unbound script:
[2.8.1-RELEASE][admin@pfSense.local.lan]/root: ls -lisah /usr/local/etc/kea/kea-dhcp4.conf /var/unbound/unbound.conf /var/unbound/leases/leases4.conf 33307 5 -rw-r--r-- 1 root wheel 12K Nov 4 17:56 /usr/local/etc/kea/kea-dhcp4.conf 189 5 -rw-r--r-- 1 root unbound 95B Nov 4 18:33 /var/unbound/leases/leases4.conf 32688 5 -rw-r--r-- 1 unbound unbound 3.2K Nov 4 18:31 /var/unbound/unbound.confcontent of unbound.conf:
[2.8.1-RELEASE][admin@pfSense.local.lan]/root: tail /var/unbound/unbound.conf include: /var/unbound/remotecontrol.conf # Python Module server:include: /var/unbound/pfb_dnsbl.*conf python: python-script: pfb_unbound.pythis is including this large config file pfb_dnsbl.conf:
[2.8.1-RELEASE][admin@pfSense.local.lan]/root: ls -lisah /var/unbound/pfb_dnsbl.*conf 32625 14813 -rw-r--r-- 1 root unbound 77M Nov 4 18:32 /var/unbound/pfb_dnsbl.confexecution of kea2unbound with debug output:
[2.8.1-RELEASE][admin@pfSense.local.lan]/root: php -d display_errors=1 -d display_startup_errors=1 -d error_reporting=E_ALL /usr/local/bin/kea2unbound --kea-conf /usr/local/etc/kea/kea-dhcp4.conf --unbound-conf /var/unbound/unbound.conf --include-file /var/unbound/leases/leases4.conf sync --subnet-id 1 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Warning: Undefined array key "domain-search" in /usr/local/bin/kea2unbound on line 467 Warning: Trying to access array offset on null in /usr/local/bin/kea2unbound on line 467 Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/bin/kea2unbound on line 528 -
@flederohr Change to python mode.
https://forum.netgate.com/topic/198381/kea2unbound-is-using-too-much-memory-in-the-process-of-upgrading-to-25.07/2 -
@SteveITS I am already using the python mode
In -> Firewall -> pfBlockerNG -> DNSBL

In -> Services -> DNS Resolver -> General Settings:

Am I missing a setting?
-
I noticed that the kea2unbound version shipped with pfsense 2.8.1 equals this commit in the pfsense git repository
Bring in Kea enhancements from Plus (marcos-ng comitted on Mar 26)After updating the version of /usr/local/bin/kea2unbound with this version:
kea2unbound: use the new unbound fast-reload feature in v1.23 (rcmcdonald91 committed on Jul 2)
the error seems to be gone.Steps
# downlaod kea2unbound Commit 146391a curl https://raw.githubusercontent.com/pfsense/pfsense/146391aa0c5c25348f8f6fa36120332ccbb74ce0/src/usr/local/bin/kea2unbound -o ~/kea2unbound # set permissions chmod +x ~/kea2unbound # backup previous version cp /usr/local/bin/kea2unbound ~/kea2unbound.bak_RELEASE_2.8.1 # overwrite version mv ~/kea2unbound /usr/local/bin/kea2unbound -
G Gertjan referenced this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy