Error in the logs: "nlbwmon]: Unable to dump contrack: I/0 error"

Hello,
I often encounter this error log on my NanoPi R4S router:

nlbwmon [15184]: Unable to dump contrack: I/0 error

Inside this contest:

2024-06-18 06:43:54.504	
2024-06-18T06:43:54+02:00 R4S nlbwmon[15184]: Unable to dump conntrack: No buffer space available
2024-06-18 06:43:54.504	
2024-06-18T06:43:54+02:00 R4S nlbwmon[15184]: Netlink receive failure: Out of memory
2024-06-18 05:28:16.541	
2024-06-18T05:28:16+02:00 R4S nlbwmon[15184]: Unable to dump conntrack: I/O error
2024-06-18 05:28:16.541	
2024-06-18T05:28:16+02:00 R4S nlbwmon[15184]: Netlink receive failure: Object busy
2024-06-18 03:47:02.086	
2024-06-18T03:47:01+02:00 R4S nlbwmon[15184]: Unable to dump conntrack: No buffer space available
2024-06-18 03:47:02.086	
2024-06-18T03:47:01+02:00 R4S nlbwmon[15184]: Netlink receive failure: Out of memory

So I tried to increase the buffer size of nlbwon, here is my configuration:

root@R4S:~# cat /etc/config/nlbwmon

config nlbwmon
	option netlink_buffer_size '212992'
	option commit_interval '6h'
	option refresh_interval '30s'
	option database_interval '1'
	option protocol_database '/usr/share/nlbwmon/protocols'
	option database_generations '0'
	option database_limit '0'
	option database_compress '1'
	option database_directory '/mnt/sda1/nlbwmon'
	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 '192.168.1.1/24'
	list local_network '192.168.2.1/24'
	list local_network '10.4.0.1/32'
	list local_network 'WAN'
	option database_prealloc '1'

But I still get this error 2-3 times/24h:

This is the only error log that appears, and it's annoying. Any solution to fix it?

Thanks

kind of self explanatory ...

Then can you explain also the solution? Thanks

Oh I forgot that I have 3.8GB of free RAM of course:

root@R4S:~# free
              total        used        free      shared  buff/cache   available
Mem:        3968724      109420     3739908        1280      119396     3803584
Swap:             0           0           0

you could have 3.8TB, and it'd still crash.

2 Likes

Oh okay thanks, I tried to increase the buffer size as explained in the post to

cat /etc/sysctl.conf

net.core.rmem_default=2097152
net.core.wmem_default=2097152
net.core.rmem_max=2097152
net.core.wmem_max=2097152

I'll see if this works for 2-3 months of uptime.