Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2001 13:12:22 -0400 (EDT)
From:      Chet Hosey <chosey@nidhog.com>
To:        Rowan Crowe <rowan@sensation.net.au>
Cc:        <freebsd-isp@FreeBSD.ORG>
Subject:   Re: boa small/fast web server
Message-ID:  <Pine.BSF.4.31.0104171306390.69834-100000@web1.nidhog.com>
In-Reply-To: <Pine.BSF.4.21.0104180241310.90106-100000@velvet.sensation.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
I don't know if this is relevant, but when listen() is called on a socket
(as it likely is by boa), the application can tell the kernel how many
queued connections to keep. Although I may be entirely wrong, I would
guess that perhaps boa isn't letting the kernel queue enough connections.

Unfortunately, there seems to be no simple way to override the
application's requests. A cap may be set on backlog length using
kern.ipc.somaxconn; depending on what boa requests, increasing this value
(default 128, it seems), may help.

Or I may be wrong :)

________________________________________________________________________

Chet Hosey
<chosey@nidhog.com>
________________________________________________________________________

On Wed, 18 Apr 2001, Rowan Crowe wrote:

> Hi all,
>
> Following up my problems with Boa... I was reading the notes page on
> thttpd (http://www.acme.com/software/thttpd/notes.html, "On the listen
> queue length"), which mentions that the queue for new TCP connections can
> be shallow, and if an application doesn't respond fast enough to connects
> that queue will be overflowed. Result: connections refused until the queue
> has one or more connections processed/cleared from it.
>
> netstat -s shows, in part...
>
>         27286 connection requests
>         1056360 connection accepts
>         368146 bad connection attempts
>         315486 listen queue overflows
>         ^^^^^^
>
> I think that is what is happening here - these stats account for a little
> more than 16 hours of uptime, or an average of around 5 refused
> connections per second for those entire 16 hours!
>
> While this would probably just be delaying the inevitable, does anyone
> know how to change the length of this queue in FreeBSD 4.x? sysctl -a
> doesn't seem to list anything that leaps out. I'll have a hunt around in
> the kernel source too, to see if I can find anything.
>
> The real problem is most likely server load, and Boa trying to process new
> connections in time (perhaps part of it is swapped out or otherwise busy).
> Like I said, this is a "no budget" site, so there's no happy ending in
> sight at the moment. :-\
>
> Cheers.
>
>
> --
> Rowan Crowe                              http://www.rowan.sensation.net.au/
> Sensation Internet Services                   http://info.sensation.net.au/
> Melbourne, Australia                                 Phone: +61-3-9388-9260
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.31.0104171306390.69834-100000>