pfSense :: pfblocker memory error

Been setting up pfblocker to block unwanted IPlists from my Network, but encountered a “not enough” memory error when adding big lists.

In short I used the build in file manager from Diagnostics – Edit File to modify 2 files:

Do yourself a favor and make a note on what you change, as shown below.

/etc/inc/config.inc and changed ini_set("memory_limit","128M"); to 500M
file01

/usr/local/pkg/pfblocker.inc and added ini_set('memory_limit', '490M');
file02

Setting Suhosin memory limit.

The above is not enoug in itself, as we also need to raise the Suhosin memory cap in php.ini

I’m using Diagnostics – File Manager to find the file. File Manager is a Package you can install from System – Packages:

02-suhosin

Edit the php.ini file located in /usr/local/lib/php.ini

Change the suhosin.memory_limit = 512435456 to something greater, like suhosin.memory_limit = 1024870912
01-suhosin
It means changing it from 512MB to 1024MB

Now we need to restart the Webgui for settings to take effect. Either reboot the entire pfsense or use this command to restart the webgui: killall -9 php; killall -9 lighttpd; /etc/rc.restart_webgui

Source for pfblocker memory setting:
https://forum.pfsense.org/index.php?PHPSESSID=cqn1ef1l2gd7g6394tp3deq5t5&topic=42543.300

Source for Suhosin memory setting:
https://forum.pfsense.org/index.php?topic=42543.45

 

Posted in pfSense Tagged with: , , ,

Leave a Reply