Crash Report - DHCP Leases - deleting expired results in error
-
I wanted to post here for (a) clarification on path forward, as I am seemingly unable to restart the DHCP service after multiple attempts, and (b) to advise those monitoring of the error as it sure seems like a product issue...
Version information:
2.4.5-RELEASE (amd64)
built on Tue Mar 24 15:25:50 EDT 2020
FreeBSD 11.3-STABLEGUI Error Experienced:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 33554440 bytes) in /usr/local/www/status_dhcp_leases.php on line 59 PHP ERROR: Type: 1, File: /usr/local/www/status_dhcp_leases.php, Line: 59, Message: Allowed memory size of 536870912 bytes exhausted (tried to allocate 33554440 bytes)Crash report:
Crash report begins. Anonymous machine information:amd64
11.3-STABLE
FreeBSD 11.3-STABLE #236 21cbb70bbd1(RELENG_2_4_5): Tue Mar 24 15:26:53 EDT 2020 root@buildbot1-nyi.netgate.com:/build/ce-crossbuild-245/obj/amd64/YNx4Qq3j/build/ce-crossbuild-245/sources/FreeBSD-src/sys/pfSenseCrash report details:
PHP Errors:
[30-Apr-2020 16:09:46 EST] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 33554440 bytes) in /usr/local/www/status_dhcp_leases.php on line 59No FreeBSD crash data found.
===========
Please advise. Thank you.
-
UPDATE:::
The above crash occurs when attempting to manually delete expired leases through the DHCP Leases GUI.
I really couldn't wait to hear back, so I took the corrective action of deleting the entirety of the DHCP.Leases file through:
Diagnostics, Edit File, Load "/var/dhcpd/var/db/dhcpd.leases", select all, delete. This got me back up and running.
The dhcp.leases file was ridiculously large for the small number of leases being allocated in my environment:
I looked over the php code in the /usr/local/www/status_dhcp_leases.php file and it definitely needs some attention/optimization.
-
The lease database size wouldn't normally reach that size... You might have a misbehaving client repeatedly making requests or otherwise causing trouble for the DHCP daemon.
You shouldn't need to manually delete or clean up leases either.