Fix for: pfblockerng_alerts - Allowed memory size exhausted
-
Hello,
Not sure if anyone else received this error, but I encountered the following:
PHP ERROR: Type: 1, File: /usr/local/www/pfblockerng/pfblockerng_alerts.php, Line: 635, Message: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) @ 2018-04-12 21:37:14It took me about 2 hours to figure out to fix this. I felt I should post this here in case someone else encounters it:
Warning: the below advice assumes your router has 768M of free memory
Using Diagnostics -Edit File:in file /usr/local/pkg/pfblockerng/pfblockerng.inc
add ini_set('memory_limit', '768M');
after pfb_global();
so it looks like this:} pfb_global(); ini_set('memory_limit', '768M'); // DNSBL Lighttpd HTTPS Daemon (Scans Lighttpd dnsbl_error.log for requested https domain names)
in file /etc/rc.php_ini_setup
update suhosin.memory_limit
to be suhosin.memory_limit = 805306368in file /usr/local/etc/php.ini
update suhosin.memory_limit
to be suhosin.memory_limit = 805306368notes:
Part of the reason I posted this here was I managed more then one pfsense router, and I have a feeling this is going to pop up again for methe pfsense router in question was not using the geo-ip feature at all
inspired by: https://forum.pfsense.org/index.php?topic=116307.msg644910#msg644910
inspired by: https://forum.pfsense.org/index.php?topic=102470.msg647719#msg647719
( I found I had to merge the advice from both of those posts to generate a working solution )
( the inspired posts refer to a similar but slightly different error where pfblockerng breaks, rather then my error which was just with the alerts )