Errors in the log (nlbwmon, netlink buffer out of memory)

Very often I see these errors in the logs. What does it mean and how to fix?

Sun May  4 08:00:39 2025 daemon.err nlbwmon[2614]: Netlink receive failure: Out of memory
Sun May  4 08:00:39 2025 daemon.err nlbwmon[2614]: Unable to dump conntrack: No buffer space available
Sun May  4 08:09:09 2025 daemon.err nlbwmon[2614]: Netlink receive failure: Out of memory
Sun May  4 08:09:09 2025 daemon.err nlbwmon[2614]: Unable to dump conntrack: No buffer space available
Sun May  4 08:11:09 2025 daemon.err nlbwmon[2614]: Netlink receive failure: Out of memory
Sun May  4 08:11:09 2025 daemon.err nlbwmon[2614]: Unable to dump conntrack: No buffer space available

By searching the forum for the error you just posted.

didn't find any proper solution...

So you've tried Nlbwmon out of memory (yet another...) ?

2 Likes

Is it possible to do on Luci interface?

You said you've already tried those solutions ?

On current main branch I see a lot of messages.

daemon.err nlbwmon: Netlink receive failure: Out of memory
daemon.err nlbwmon: Unable to dump conntrack: No buffer space available

That's on R7800 ipq-806x kernel 6.6.93.
My settings from 23.05 are the same and on 23.05 I have never seen that error appear after making bellow settings changes.

config nlbwmon
	option netlink_buffer_size '1573376' <-- I changed this
	option commit_interval '24h'
	option database_directory '/var/lib/nlbwmon'
	option database_generations '10'
	option database_interval '1'
	option database_limit '10000'
	option protocol_database '/usr/share/nlbwmon/protocols'
	list local_network '192.168.0.0/16'
	list local_network '172.16.0.0/12'
	list local_network '10.0.0.0/8'
	list local_network 'lan'
	option refresh_interval '5m'

/target/linux/ipq806x/base-files/etc/init.d/bootcount

	#nlbwmon fix
	sysctl -w vm.min_free_kbytes=65536
	sysctl -w net.netfilter.nf_conntrack_max=32768
	sysctl -w net.core.rmem_default=524288
	sysctl -w net.core.wmem_default=524288
	sysctl -w net.core.rmem_max=1573376
	sysctl -w net.core.wmem_max=1573376

Any ideas or solutions?
The good part of it is that despite those errors nlbwmon works and counts traffic.

Have you followed the instructions in the link above?

Are you the OP (Denim)?

It's seen form my post that I've followed them. I'm not the OP.
Sorry, "again" was simply a lapse.
I edited my post to be clearer about the case.

Thanks for that, although you were clear.

I don't see that you followed. Did you enter these in /etc/sysctl.d/99-user.conf - as noted in the link above?

(Not sure if the method you used actually works.)

Unless something changed fundamentally from 23.05 I see this

root@R7800:~# sysctl net.core.rmem_default
net.core.rmem_default = 524288
root@R7800:~# sysctl net.core.rmem_max
net.core.rmem_max = 1573376
root@R7800:~# sysctl net.core.wmem_max
net.core.wmem_max = 1573376

so should work.

On another router running main snapshot I have this. I don't use nlbwmon on it.

root@QNAP:~# sysctl net.core.wmem_max
net.core.wmem_max = 212992
1 Like

Make your /etc/sysctl.conf look like this:

# Defaults are configured in /etc/sysctl.d/* and can be customized in this file
rp_filter = 2
#net.core.rmem_max=3146752
#net.core.wmem_max=3146752
net.core.rmem_default=10485760
net.core.wmem_default=10485760
net.core.rmem_max=10485760
net.core.wmem_max=10485760

Change your /etc/config/nlbwmon with:
uci set nlbwmon.@nlbwmon[0].netlink_buffer_size='10485760'
uci commit nlbwmon

Finally restart nlbwmon:
service nlbwmon restart

3 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.