From owner-freebsd-questions@FreeBSD.ORG Tue Aug 1 19:02:28 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 EB55C16A4DD for ; Tue, 1 Aug 2006 19:02:28 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80AFB43D70 for ; Tue, 1 Aug 2006 19:02:27 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from collaborativefusion.com (mx01.pub.collaborativefusion.com [206.210.89.201]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 01 Aug 2006 15:02:27 -0400 id 00056426.44CFA543.00012B01 Received: from Internal Mail-Server (206.210.89.202) by mx01 (envelope-from wmoran@collaborativefusion.com) with AES256-SHA encrypted SMTP; 1 Aug 2006 14:58:53 -0400 Date: Tue, 1 Aug 2006 15:02:26 -0400 From: Bill Moran To: questions@freebsd.org Message-Id: <20060801150226.0c911297.wmoran@collaborativefusion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: 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:02:29 -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). 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.