1.9.4: TCP queries when some threads are full
patrik at sigterm.se
Tue Oct 22 08:34:22 UTC 2019
On Mon, Oct 21, 2019 at 02:30:17PM +0200, Wouter Wijngaards via Unbound-users wrote:
> You should probably increase that count to 100 or better 1000.
> incoming-num-tcp: 1000
> And perhaps also increase the upstream (outgoing-num-tcp) if you have
> upstream TCP or TLS configured.
Thanks for the input, if you specifically mean "tcp-upstream" and
"tls-upstream" then both of them are the default "no".
> This allocates more buffers and that is useful for a server with more
> clients on it.
I will increase incoming-num-tcp and see how it turns out. It just
felt wrong to increase the value without reaching out to the list since
the statistics were showing several threads having 0 clients, at least
giving me the impression that there should be plenty of connection slots
> When TCP is nearly full it should use an even shorter timeout. And not
> allow such very long idle connections. That looks like it went wrong.
Yeah I noticed the time limiting code in setup_tcp_handler(). I was
wondering about the wording in the man page for "tcp-idle-timeout" that
states "The period Unbound will wait for a query on a TCP
connection", which could suggest that the timeout is only looked at for
an initial query, and a bit unclear on what happens if you open a
connection, do a query, and then hold on to the connection.
More information about the Unbound-users