What buffer space is related to "sendto failed: No buffer space available" log entries?

Hi,

I'm trying to solve the following issue:

unbound: notice: sendto failed: No buffer space available
unbound: notice: remote address is .... port 53

OS: FreeBSD 12.0
unbound 1.8.3

The number next to "dropped due to full socket buffers"
in the output of "netstat -s -p udp"
does not increase when this happens, so I assume it is not related to UDP but about outbound TCP queries?

so far I tried:

1) so-sndbuf: 4m + related kern.ipc.maxsockbuf sysctl setting (UDP)

2) net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.sendbuf_inc=16384

3) outgoing-num-tcp: 20 (50 and 100)

but the issue persists.

What buffer is the log entry about and what setting could be changed to address this?

On FreeBSD 11.2 this issue did not occur (same amount of qps).

thanks,
nusenu

after reading [1] I also lowered "num-queries-per-thread"
to 1/4 of the original value, with no positive effect

[1] https://nlnetlabs.nl/pipermail/unbound-users/2014-February/008574.html

Hi nusenu,

What I think happens is that this is so-sndbuf for UDP packets, and the
so-sndbuf option solves it. But you already use that so I do not know
any further. Where you could look further is in the sendto(2) system
call documentation, for UDP packets, when it gives this ENOBUFS error
code. The FreeBSD documentation suggest two causes for this error code,
one it that there was not enough memory for a buffer, and the second
that the network interface has stopped sending and it is full.

Best regards, Wouter

Hi Wouter,

thanks for your reply.

Wouter Wijngaards via Unbound-users:

What I think happens is that this is so-sndbuf for UDP packets, and the
so-sndbuf option solves it. But you already use that so I do not know
any further.

I increased so-sndbuf to as far as 12m but the issue persists.

Where you could look further is in the sendto(2) system
call documentation, for UDP packets, when it gives this ENOBUFS error
code. The FreeBSD documentation suggest two causes for this error code,
one it that there was not enough memory for a buffer

is this exclusively about so-sndbuf or potentially also about other buffers?

, and the second
that the network interface has stopped sending and it is full.

since both cases have the same error message (ENOBUFS) I guess
there is no way to tell these cases apart, right?