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

From: Gary Jennejohn <garyj_at_gmx.de>
Date: Tue, 20 Jun 2023 14:41:41 UTC
On Tue, 20 Jun 2023 12:04:13 +0200
Alexander Leidinger <Alexander@leidinger.net> wrote:

> 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.
>

On my FreeBSD14 system these things are all under kern.ipc.

maxconn seems to be an alias for soacceptqueue, which is set to 128 on
my machine.

However, the software he's using may have set backlog to 1.  Hard to say
based on the trace he provided.

--
Gary Jennejohn