From owner-freebsd-isp Tue Apr 17 10:12:49 2001 Delivered-To: freebsd-isp@freebsd.org Received: from web1.nidhog.com (web1.nidhog.com [192.204.160.129]) by hub.freebsd.org (Postfix) with ESMTP id 45EA137B43C for ; Tue, 17 Apr 2001 10:12:46 -0700 (PDT) (envelope-from chosey@web1.nidhog.com) Received: from localhost (chosey@localhost) by web1.nidhog.com (8.11.3/8.11.3) with ESMTP id f3HHCMP70182; Tue, 17 Apr 2001 13:12:23 -0400 (EDT) (envelope-from chosey@web1.nidhog.com) X-Authentication-Warning: web1.nidhog.com: chosey owned process doing -bs Date: Tue, 17 Apr 2001 13:12:22 -0400 (EDT) From: Chet Hosey To: Rowan Crowe Cc: Subject: Re: boa small/fast web server In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 ________________________________________________________________________ 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