Re: kernel: sonewconn: pcb 0xfffff8002b255a00 (local:/var/run/devd.seqpacket.pipe): Listen queue overflow: 1 already in queue awaiting acceptance (60 occurrences), ?

From: Alexander Leidinger <Alexander_at_leidinger.net>
Date: Tue, 20 Jun 2023 10:04:13 UTC
Quoting Gary Jennejohn <garyj@gmx.de> (from Tue, 20 Jun 2023 07:41:08 +0000):

> On Tue, 20 Jun 2023 06:25:05 +0100
> Graham Perrin <grahamperrin@freebsd.org> wrote:
>
>> Please, what's the meaning of the sonewconn lines?
>>
>
> sonewconn is described in socket(9).  Below a copy/paste of the description
> from socket(9):
>
>      Protocol implementations can use sonewconn() to create a socket and
>      attach protocol state to that socket.  This can be used to create new
>      sockets available for soaccept() on a listen socket.  The  
> returned socket
>      has a reference count of zero.
>
> Apparently there was already a listen socket in the queue which had not been
> consumed by soaccept() when a new sonewconn() call was made.
>
> Anyway, that's my understanding.  Might be wrong.

In other words the software listening on it didn't process the request  
fast enough and a backlog piled up (e.g apache ListenBacklog or nginx  
"listen X backlog=y" and "sysctl kern.ipx.somaxconn=X" for FreeBSD  
itself). You may need faster hardware, more processes/threads to  
handle the traffic, or configure your software to do less to produce  
the same result (e.g. no real-time DNS resolution in the logging of a  
webserver or increasing the amount of allowed items in the backlog).  
If you can change the software, there's also the possibility to switch  
from blocking sockets to non-blocking sockets (to not have the  
select/accept loop block / run into contention) or kqueue.

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF