pfBlockerNG Cannot Allocate Memory errors

Hi all. New to the forums, but have been enjoying Tom’s videos for the last year+. I have a Netgate SG3100 running pfSense with pfBlockerNG. I periodically get errors like this one:

There were error(s) loading the rules: /tmp/rules.debug:31: cannot define table pfB_Europe_v4: Cannot allocate memory - The line in question reads [31]: table <pfB_Europe_v4> persist file “/var/db/aliastables/pfB_Europe_v4.txt”

Googling this, I found people recommend increasing “Firewall Maximum Table Entries” in System > Advanced > Firewall & NAT from its default to 400000 (or more). I’ve tried this. I even went as high as 900000 but the error still persists. Any ideas? Did I do something wrong?

Thanks in advance,

Try increasing it more, sounds like it is still exceeding the table size.

I’ve increased it 10x over the previous setting (its now 4000000). No difference. I would think at the very least, that this would change which file and line the system has a problem loading, but it still reports the same file and line. The problem has to be elsewhere, I would think. Or there is some kind of problem in that pfB_Europe_v4.txt file? I wonder if uninstalling and then reinstalling pfBlocker would delete that file?

The file should get updated automatically, but in case something is stuck you can try that.

1 Like

I had this same issue the other day after added 1 new rule manually. It appeared to have broken a lot of my things until I doubled the maximum table entries. I also increased the maximum states.

Finally, I ended up disabling all pfBlockerRules under the firewall section, applying, and then rebooting. Once it booted back up I turned them back on, applied, and rebooted again. Error went away.

Hope this helps you because it was driving me nuts that adding only one rule broke a bunch of my rules.


Thanks Mike. I will be giving this a try. The problem started for me after either adding or editing a rule. I can’t remember which. But it sounds like a similar issue. I will report back what I find out.


Sorry for the late update. I wanted to report back that this has been resolved per @itsmikeboyd suggestion.

Disabling, then restarting and then re-enabling did the trick for me. Pfblocker now loads without errors.

Thanks again.


Awesome. Glad to hear that worked for you.

I am having the same issue, even after I tried what @itsmikeboyd suggested; also have the SG-3100.

My Firewall Maximum Table Entries is currently at 500000. How high can I safely go?