Nlbwmon error without changing any settings on the router

Hello Guys...

This morning I checked the data on nlbwmon and left for work...

No one changed anything during the day; only I have access to the router...

When I arrived in the afternoon, I went to check, and I saw this error.

How can this be? No one changed anything during the day.

It stuffs data in /tmp - check f it is not full with something else….

Hi brada4, how are u?

My data is saving on my usb stick and isn´t full..
You gave me an idea to save this file in another location.. maybe the stick can be broken...

I'll run the tests and get back to you with some information.

Thanks so far!

Hey,
please check first if the nlbwmon process is still running:

service nlbwmon status

Also it could be really helpful, if you share your config-file for nlbwmon:

cat /etc/config/nlbwmon

1 Like

Service is running, no problem with this..

My /etc/config/nlbwmon:

config nlbwmon
	option netlink_buffer_size '524288'
	option commit_interval '5min'
	option refresh_interval '30s'
	option database_directory '/mnt/sdc1/horus/data/nlbwmon'
	option database_generations '0'
	option database_interval '1'
	option database_limit '0'
	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'
	list local_network 'wireguard'

I try to move my db to /tmp and restart the service, same error...
Very strange, nothing is alter is the router...

and if you moved to /tmp'

nlbwmon can not start :wink:

first I would change the database_directory

	option database_directory '/tmp/nlbwmon'

now start again

I guess, the root cause of your problem, is something with your mounted sdc1.
You should check this.

Same error...

Right, maybe my database is corrupted... but with the new database, should work, but no! :face_with_spiral_eyes:

Same error.. :tired_face:

But it always worked fine in that location...
And if there was a problem there, changing it to /tmp/nlbwmon should work, but it doesn't. I have exactly the same error...
Curious, right?

Did you create this folder before?

tmp/nlbwmon

yes, it should and actually has to work :wink:

So please have a look at logread and grep nlbwmon

logread | grep -i nlbwmon

Yes, I stop the service, make a backup, create the folder, make adjust in location and start the service... but I´ll make again - no problem with this!

root@horus:~# logread | grep -i nlbwmon
Thu Oct 23 17:51:15 2025 user.notice nlbwmon: Reloading nlbwmon due to ifup of wan (pppoe-wan)
Thu Oct 23 17:51:16 2025 user.notice nlbwmon: Reloading nlbwmon due to ifup of wireguard (wireguard)
Thu Oct 23 17:51:18 2025 user.notice nlbwmon: Reloading nlbwmon due to ifup of wan_6 (pppoe-wan)
Thu Oct 23 17:51:37 2025 user.notice nlbwmon: Reloading nlbwmon due to ifup of wan (pppoe-wan)
Thu Oct 23 17:51:37 2025 user.notice nlbwmon: Reloading nlbwmon due to ifup of wireguard (wireguard)
Thu Oct 23 17:51:40 2025 user.notice nlbwmon: Reloading nlbwmon due to ifup of wan_6 (pppoe-wan)
Thu Oct 23 18:12:22 2025 daemon.err nlbwmon[1635]: Netlink receive failure: Out of memory
Thu Oct 23 18:12:22 2025 daemon.err nlbwmon[1635]: Unable to dump conntrack: No buffer space available
Thu Oct 23 20:31:48 2025 daemon.err nlbwmon[24664]: Netlink receive failure: Out of memory
Thu Oct 23 20:31:48 2025 daemon.err nlbwmon[24664]: Unable to dump conntrack: No buffer space available
root@horus:~#

Even though it worked, it seems to me that we have some "strange" messages in the log, right? Messagens like "No buffer space available" and "Out of memory".

Probably not :wink:
whatever now it's running right?

but these log-lines are old, correct?
(I do not know your time)

From my notes this is what I had to do to get nlbmon to keep from crashing with out of memory errors:

add the following in /etc/config/nlbmon
option netlink_buffer_size '1048576'

add the following to sysctl.conf
net.core.rmem_default=1048576
net.core.rmem_max=1048576

You should reboot after updating sysctl.conf

1 Like

Right, but the database file is corrupted. I create a new in the same location and works good.

No, is recent. Here in Sao Paulo (Brazil) is 09:11 PM now!

Thanks rexbinary...

My system have 8 Gigs of RAM, do you know if these numbers are sufficient or if I can increase theses values?

Thanks for you help!

1 Like

hm ok, probably @rexbinary advice could help. on some device it's helpful.

that's a lot.

on my server , I'm using
option netlink_buffer_size '20000000'

oh, I see you are using also an wireguard tunnel. nice

But unfortunately nlbwmon can not see this traffic and count it correctly

1 Like

@rexbinary is on the right track, but it needs a little extra in /etc/sysctl.conf. make it look like:

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

Sorry, I wasn’t able to check my actual configuration until now. These are the tweaks I actually made:

add the following in /etc/config/nlbmon
option netlink_buffer_size '1048576'

add the following to /etc/sysctl.conf
net.core.rmem_max=1048576

Turns out the net.core.rmem_default=1048576 wasn’t needed.

I have 4GB memory and 1048576 was sufficient to get rid of the out of memory errors on my device which is a NanoPi R4S.

Now I should edit my notes. :slight_smile:

1 Like

Hello Everyone...

Thanks to everyone who responded and tried to help!
I'm currently using the settings suggested by @rexbinary and it's working correctly...

Some questions:

What software do you use to open and edit data in .db files? It can be on Linux or Windows, it doesn't matter...
My idea is to take the data from the old file and try to paste it into the new file, but I don't even know if that's possible...

1 Like

You don’t. See: https://github.com/jow-/nlbwmon/blob/master/database.c for the logic, database.h for the structure.

1 Like

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