From owner-freebsd-questions@FreeBSD.ORG Tue Mar 4 07:20:40 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06C751065672 for ; Tue, 4 Mar 2008 07:20:40 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54307.mail.re2.yahoo.com (web54307.mail.re2.yahoo.com [206.190.49.117]) by mx1.freebsd.org (Postfix) with SMTP id B9EA08FC25 for ; Tue, 4 Mar 2008 07:20:39 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 69543 invoked by uid 60001); 4 Mar 2008 07:20:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=53TvYvV4KwRnKHhrm2GRz9MZXzN+7Ua5fbsVXDhzatBWLLdgZs8lMWyRo8cfSeOuv4qST8vSg2SPtO/tOXdSB9p509v451iQW9J8DJwJQVXJLNQltyag/7tkNmb3mLWidKF6CxqjC59O4B6kDkNDGYhq/CPylR9u0JbXvBj/TBs=; X-YMail-OSG: 5s4WGBwVM1l7bUY9Ay3qZN7TAahWvoFmaw8pScVtM62uBtT7QqSJ0_iel0mhyvEkq85tQhffyJp3qITezcVA13Cw6Y5X6PtisOiwYxlcIMlVw.ofdq0- Received: from [202.128.254.139] by web54307.mail.re2.yahoo.com via HTTP; Mon, 03 Mar 2008 23:20:38 PST Date: Mon, 3 Mar 2008 23:20:38 -0800 (PST) From: Patrick Dung To: freebsd-questions@freebsd.org, Bill Moran , Matthew Seaman In-Reply-To: <20080303152156.ddbddb3b.wmoran@potentialtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <947386.69120.qm@web54307.mail.re2.yahoo.com> Cc: Subject: Re: Maximum number established TCP connection X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 07:20:40 -0000 --- Bill Moran wrote: > In response to Matthew Seaman : > > > Bill Moran wrote: > > > In response to Patrick Dung : > > > > > >> Hello > > >> > > >> I would like if there is a (countable) limit for the max TCP > connection > > >> of a Apache web server. > > >> > > >> Suppose: > > >> 1. An apache web server serves a very big iso file. > > >> 2. 5000 people tried to connect to the apache server to get the > iso > > >> file. > > >> 3. They connect to the server gradually (not 5000 people > starting at > > >> the same moment). So that there will not be a problem caused by > the TCP > > >> backlog limit. > > >> 4. There will be 5000 established TCP connections. > > >> > > >> Is it true that FreeBSD could handle 'unlimited' established TCP > > >> connections as long as it has enough CPU power and memory? > > > > > > The FreeBSD limit on the number of open TCP connections is > significantly > > > higher than the Apache limit on the number of concurrent HTTP > sessions. > > > I believe Apache has a hard limit of 256. > > > > That's a compile-time option in apache-1.3.x -- you can set > > APACHE_HARD_SERVER_LIMIT in /etc/make.conf to override the default > of > > 512 if required. > > > > However in apache-2.2.x it seems the limits are imposed entirely by > > the MPM settings in httpd.conf -- at least, I cannot find any > tunables > > in the port Makefiles. > > Interesting. I found this: > http://httpd.apache.org/docs/2.0/mod/mpm_common.html#serverlimit > Which claims the hard limit is 20,000. So I guess my information is > a bit out of date. > > -- > Bill Moran > http://www.potentialtech.com > Hello I have checked the link and dig deeper. For prefork model: One connection should be served by one httpd child process. The default limit, as most of you had said, it should be MaxClients or ServerLimit (default is 256 described in apache manual). If worker model is used, the max connection limit should still be MaxClients, but there are other related parameters which affect the limit. (ThreadsLimit, ServerLimit, ThreadsPerChild). ps: Each directive (eg. ServerLimit) may have different meanings in different MPM. I hope my understanding is correct and please correct me if I am wrong. Regards Patrick ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping