From owner-freebsd-net@FreeBSD.ORG Sat Mar 27 07:40:46 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E84E816A4CE for ; Sat, 27 Mar 2004 07:40:46 -0800 (PST) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6811143D2D for ; Sat, 27 Mar 2004 07:40:45 -0800 (PST) (envelope-from is@rambler-co.ru) Received: from is (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id i2RFeLgU057843; Sat, 27 Mar 2004 18:40:21 +0300 (MSK) (envelope-from is@rambler-co.ru) Date: Sat, 27 Mar 2004 18:40:21 +0300 (MSK) From: Igor Sysoev X-Sender: is@is To: Kevin Day In-Reply-To: <23E302EC-7F7F-11D8-AA0F-000A95A8A1F2@dragondata.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: sendfile returning ENOTCONN under heavy load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2004 15:40:47 -0000 On Fri, 26 Mar 2004, Kevin Day wrote: > I'm using thttpd on a server that pushes 300-400mbps of static content, > using sendfile(2). > > Once the load reaches a certain point (around 800-1000 clients > downloading, anywhere from 150-250mbps), sendfile() will start randomly > returning ENOTCONN, and the client is disconnected. I've raised > kern.ipc.nsfbufs pretty high and that hasn't made any difference. Is > there any easy way to tell exactly why the sockets are being closed? I > can't seem to find any obvious signs of memory exhaustion or anything. It's the sendfile(2) feature. It can return ENOTCONN instead EPIPE. See the message: http://freebsd.rambler.ru/bsdmail/freebsd-hackers_2004/msg00019.html and its follow-ups. Igor Sysoev http://sysoev.ru/en/