DNS log spam: cache full, not storing – how to stop it?

I’m using a MikroTik cAP ac and I have configured a small DNS cache size on the device. Because of this, the log is constantly filled with messages like:

dns, error: cache full, not storing

dns, error: cache full, not storing[ignoring repeated messages]

The number of these messages is very high and it makes it difficult to review more important log entries.

What is the best way to prevent these messages from appearing in the logs?
Is there a recommended configuration to avoid DNS cache overflow messages, or a way to suppress/filter these specific log entries without disabling DNS logging completely?

Thanks you in advance for your help.

What is the current cache size? And why do you have DNS configured on this device?

The cAP ac has limited memory, so I have configured the DNS cache size to 128 KiB.
Devices in the network send their DNS queries to the router, and the router forwards these queries to an external DNS provider using the DoH (DNS over HTTPS) protocol.

Why a DNS server and cache on the cAP ac?
Am I correct that it is only used by the cAP ac itself?

128KiB is too little. There is an overhead even when you have no records in the cache. Here are some samples:


image
image

With 128KiB you won't be able to store even 50 records in the cache. But you can also see that from 45 items to 384 items only 80KiB additional memory is used. There is some minimum book-keeping overhead.

You should increase the size to at least 512KiB, that might be able to keep 1000 entries in the cache. But I see no reason why you cannot keep the default cache size of 2MiB. My hAP ac² also only has 128MiB RAM and setting aside 2MiB for the DNS cache is not a problem.

With the latest RouterOS version and the wifi-qcom-ac package, there is very little disk space available on the device.
Because of this, I had to limit the DNS cache size so aggressively.
I just want to stop this specific log message from appearing, but so far I haven’t been able to filter it out successfully.

The DNS cache is in the memory (RAM) only so it will use what you have 26.6MiB left:

It doesn't use the flash storage, which is the persistent storage (of what you have 288KiB free).

You can keep the DNS cache at 2MiB without problem on your device.

2 Likes

Every time I see "only" in the same sentence as "128MiB RAM" I die a little bit inside :disappointed_face:.

1 Like