From owner-freebsd-stable@FreeBSD.ORG Wed Nov 28 19:16:29 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2E2316A473 for ; Wed, 28 Nov 2007 19:16:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 64A1F13C45A for ; Wed, 28 Nov 2007 19:16:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id lASJGSJS001908; Wed, 28 Nov 2007 14:16:28 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Wed, 28 Nov 2007 14:16:28 -0500 (EST) Date: Wed, 28 Nov 2007 14:16:27 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Ivan Voras In-Reply-To: Message-ID: References: <20071127135320.GJ2045@oak.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org, freebsd-stable@freebsd.org Subject: Re: connect() returns EADDRINUSE during massive host->host conn rate X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 19:16:29 -0000 On Wed, 28 Nov 2007, Ivan Voras wrote: > Jan Srzednicki wrote: >> Hello, >> >> I have a pair of hosts. One of them performs a massive amount of >> TCP connections to the other one, all to the same port. This setup >> mostly works fine, but from time to time (that varies, from once a >> minute to one a half an hour), the connect(2) syscall fails with >> EADDRINUSE. The connection rate tops to 50 connection >> initiations/second. > > This looks like the old (and probably well known) problem "ab" has. > ("ab" is "apache benchmark", a utility which is bundled with apache and > which does repeated connections to the specified address, does > transactions and computes some statistics). AFAIK this behaviour was > present since at least 5.2, maybe earlier. No known fixes. Could it have anything to do with the listen backlog on the server end? -- DE