From owner-freebsd-questions@FreeBSD.ORG Tue Aug 1 19:59:20 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4EF916A4E7 for ; Tue, 1 Aug 2006 19:59:20 +0000 (UTC) (envelope-from freebsd@philip.pjkh.com) Received: from bravo.pjkh.com (bravo.pjkh.com [72.36.232.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43B5643D55 for ; Tue, 1 Aug 2006 19:59:20 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from bravo.pjkh.com (bravo.pjkh.com [72.36.232.219]) by bravo.pjkh.com (Postfix) with ESMTP id 4D7F713C7D1; Tue, 1 Aug 2006 15:04:26 -0500 (CDT) Received: by bravo.pjkh.com (Postfix, from userid 1000) id 1CA0E13C7D0; Tue, 1 Aug 2006 15:04:26 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by bravo.pjkh.com (Postfix) with ESMTP id 1B9A513C7CF; Tue, 1 Aug 2006 15:04:26 -0500 (CDT) Date: Tue, 1 Aug 2006 15:04:26 -0500 (CDT) From: Philip Hallstrom To: Bill Moran In-Reply-To: <20060801150226.0c911297.wmoran@collaborativefusion.com> Message-ID: <20060801150300.G11829@bravo.pjkh.com> References: <20060801150226.0c911297.wmoran@collaborativefusion.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Cc: questions@freebsd.org Subject: Re: Reducing the timeout on a 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, 01 Aug 2006 19:59:20 -0000 > I'm writing some monitoring scripts, and I'm having some trouble because > the TCP seems to wait 90 seconds before giving up on initiating a > connection. > > (The script is in PHP, testing a PostgreSQL database. Neither PHP nor > libpq (which PHP's PostgreSQL support is based on) seem to have any > settings that can be used to adjust this timeout). http://www.php.net/fsockopen Last parameter is a timeout value... I'd imagine the other socket calls have something similar... whether or not it's honored I dunno, but it is there. Although maybe i'm misunderstanding the question. > > If my memory of Stevens is correct, this is something that's set at the > OS level. It doesn't seem as if it's a configurable value, however. > I guess I'm looking for confirmation on that point first. If that's > the case, then I'll have to adjust my approach based on that knowledge. > > If it can be adjusted, can it be adjusted on a per-connection basis? I > don't want to mess with timeouts on other sockets, _just_ this one > monitoring script. > > And of course, the final question: how would I adjust this setting if > it's possible? If it's a sysctl, I'm missing it ... > > Suggestions? > > -- > Bill Moran > Collaborative Fusion Inc. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >