Return-path: <root@fatcity.cts.com>
Envelope-to: oracle-l@orafaq.net
Delivery-date: Wed, 25 Sep 2002 02:20:42 +0800
Received: from newsfeed.cts.com ([209.68.248.164])
 by jean.onefuse.com with esmtp (Exim 3.36 #1)
 id 17tuIZ-0005M0-00
 for oracle-l@orafaq.net; Wed, 25 Sep 2002 02:20:39 +0800
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id LAA92867;
 Tue, 24 Sep 2002 11:20:06 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004D8188; Tue, 24 Sep 2002 10:59:03 -0800
Message-ID: <F001.004D8188.20020924105903@fatcity.com>
Date: Tue, 24 Sep 2002 10:59:03 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "MacGregor, Ian A." <ian@SLAC.Stanford.EDU>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "MacGregor, Ian A." <ian@SLAC.Stanford.EDU>
Subject: RE: How to reproduce a hanging connect attempt
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Have you fooled with the CONNECT_TIMEOUT_<LISTENER> parameter of listener.ora?  Setting it to 0 won't guarantee a connection will hang, but  will tell a process to wait forever to connect.  Hanging connections were a problem for us with the earlier Oracle 6 releases.  My solution was less elegant. It used one program which attempted to connect, wrote a timestamp, and signaled if the connection failed ; another checked the timestamp against the current time and signaled if yhe difference was too great  I cannot recall seeing the hanging problem for years, but we still run the program to check for it.

I've been stating that three things can happen on an Oracle connection attempt for years:  it can be successful, it can fail, or it can hang and return  nothing.  Yet, 100% of the scripts I see which attempt to connect to the database to ensure it is functional do not consider the third possibility.

Seems with your upcoming article that percentage will drop to 99.9999. 

Ian MacGregor
Stanford Linear Accelerator Center
ian@SLAC.Stanford.edu

-----Original Message-----
Sent: Monday, September 23, 2002 10:03 PM
To: Multiple recipients of list ORACLE-L



Dear List,

As an example for an article I'm working on, I'm showing how
a hanging connect can be timed out in a Perl script via the 
alarm() call.

By 'hanging connect' I mean a connection attempt that never
connects and never returns an error code.

I have one right now on my Linux box.  I started a database, did
kill -9 on the oracle processes, and now attempts to login
to the database hang. It's been that way for 24 hours now. 

e.g. sqlplus scott/tiger@ts98

... never returns an error code, never connects.

Guess it isn't going to connect.  This could be a problem in a
ksh script written to check connectivity.  ( which is why I
use Perl )

The question is, why?  What is a consistent way to reproduce
this error?  The method I used isn't consistent.

This is something that I see happen from time to time on Oracle
databases, both NT and Unix platforms, hence the reason for 
the timeout on the connect.

Any thoughts on how to consistently reproduce this, on either platform?

Thanks,

Jared

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: jkstill@cybcon.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: MacGregor, Ian A.
  INET: ian@SLAC.Stanford.EDU

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

