Out of memory caching validator results

Hi,

I am currently running an unbound instance on openbsd 4.5

The compile options I used are:
./configure --prefix=/opt/unbound-1.4.4
–with-ssl=/usr
–with-libevent=/usr
–without-pthreads
–with-chroot-dir=/var/unbound
–with-pidfile=/var/run/unbound.pid
–with-conf-file=/var/unbound/etc/unbound.conf
–with-username=named

Mofified parameters in Unbound.conf
verbosity: 1
extended-statistics: yes
num-threads: 1
outgoing-range: 1024
msg-cache-size: 300m
num-queries-per-thread: 1024
rrset-cache-size: 600m
do-ip6: no
access-control: 0.0.0.0/0 allow
prefetch: yes
prefetch-key: yes
module-config: “validator iterator”

After running a day and memory usage going up to 1.5 GB the daemon exits with the following message.

error: tcp send r: Broken pipe
error: out of memory caching validator results

Memory usage limit on my machine is set to 2GB per process the machine has 3GB of RAM. At the point of the crash there was enough free memory.

Does this error mean I need to increase the key-cache size? Currently it is set to default size of 4MB.

I would assume if the cache limit is reached it would flush older entries to clear up memory….

Cheers,
Mike

Hi Michael,

Those two errors are not fatal. They are serious, the first that a
remote host process ended (well, maybe not very serious unless you are
on a local network), and the second that the system is out of memory. I
cannot tell you why it is out of memory. Enlarging the key cache (since
you do not do validation) is not the best idea, also it uses just more
memory.

Do you have additional logs?

(yes it does flush older entries from cache to make space, but the OS
tells unbound there is no more space for a new entry).

Best regards,
   Wouter

Hi Wouter,

I found the issue:

Even though I set the datasize in login.conf to 2048M.
Ulimit -d still only allows 1024M, That's why unbound crashes.

Manually setting ulimit to 2048M is not possible.

So I need to dig into the kernel parameters to override this.

Thanks for the help :slight_smile:
Mike