From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7021 invoked by alias); 12 Dec 2007 15:50:52 -0000 Received: (qmail 7008 invoked by uid 22791); 12 Dec 2007 15:50:49 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.178) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Dec 2007 15:50:33 +0000 Received: by py-out-1112.google.com with SMTP id a25so710107pyi.11 for ; Wed, 12 Dec 2007 07:50:23 -0800 (PST) Received: by 10.35.106.15 with SMTP id i15mr938342pym.23.1197474623209; Wed, 12 Dec 2007 07:50:23 -0800 (PST) Received: by 10.35.95.17 with HTTP; Wed, 12 Dec 2007 07:50:23 -0800 (PST) Message-ID: Date: Wed, 12 Dec 2007 15:50:00 -0000 From: "Anthony Tonizzo" To: ecos-discuss@ecos.sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: Idle timeout and maximum # of sockets for athttpd X-SW-Source: 2007-12/txt/msg00040.txt.bz2 > I don't quite understand CYG_HTTPD_SOCKET_IDLE_TIMEOUT > in detail, but it is hardwired to 300 seconds which appears to be > rather long for the default maxim # sockets (16). The time of 5 minutes before an inactive socket is closed was chosen without much concern to the maximum number of sockets. Its intentions were mainly to close sockets that have been inactive for more than 5 minutes, regardless of the reason: In other words I felt that with persistent connections (and very few sockets available to begin with) it is important to reclaim any and all resource you might think are not actively used. The sockets might be dead, or the user of the client might just be enjoying a sandwich before she comes back surfing: Either way if the socket is idle for 5 minutes I want to be able to reclaim it for connections that actually carry some traffic. We can make a case for making this a CDL option.. > Could CYG_HTTPD_SOCKET_IDLE_TIMEOUT be set to 0? > What would happen? I can interpret this question two ways: 1) CYG_HTTPD_SOCKET_IDLE_TIMEOUT equal 0 means that there is no timeout (i.e. remove the call to cyg_httpd_close_unused_sockets(). In this case the sockets will be opened forever. You are now at the mercy of the stack to determine that a socket is dead. Might work, but I have not experimented with it. Now, your delay is even more hardcoded (this time inside the stack itself.) 2) CYG_HTTPD_SOCKET_IDLE_TIMEOUT is active and equal 0 in which case, with the current code you would effectively resort to closing each connection after the request was served. In other words, you void the advantages of persistent connections by reverting to HTTP 1.0. If you think 16 sockets are not enough with persistent connections you will hate the alternative, where a single web page with a lot of pictures can exhaust the number of sockets. Tony -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss