Log flooded with cache full, not storting (dns)

I recently upgrade a CRS312-4C+8XG from 7.12.2 to RouterOS 7.17.2 (I was having issues with the device crashing/rebooting with out of memory every few days, and the changelog somewhere mentions fixes for a memory leak). The problem was not solved but I have a new very serious issue.

The log gets flooded with entries

cache full, not storing
cache full, not storing [ignoring repeated messages]

  • DNS queries from WAN are blocked.
  • Increasing the Cache Size does not solve (if changed from default 2048k to e.g. 8192k, “cache used” immediately jumps up 8192k as well, and log entries continue to flood the log)
  • Local hosts are allowed, but I reconfigured DHCP to not advertise the router as DNS server, so LAN DNS requests to the Mikrotk are infrequent (some statically configured nodes)
  • The Cache only showed static entries. I even tried disabling those, and now /ip/dns/cache actually looks completely empty

The config is very simple, all defaults.

/ip/dns/export

2025-02-23 15:56:41 by RouterOS 7.17.2

software id = GLGZ-XN9Z

model = CRS312-4C+8XG

serial number = HG809PE8WF3

/ip dns
set allow-remote-requests=yes cache-max-ttl=5m servers=8.8.8.8

There is another thread on this, but things that seemed to solve this for others on older versions (upgrade RouterOS, block WAN request, …) do not solve it here…
Changing cache-max-ttl to anything from 0 to very large (days) does not change anything either, seems like each DNS request triggers a error message in the log.

This renders the integrated DNS server pretty much unusable. Is there any way to mitigate this problem?