Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to reproduce a hanging connect attempt

RE: How to reproduce a hanging connect attempt

From: MacGregor, Ian A. <ian_at_SLAC.Stanford.EDU>
Date: Tue, 24 Sep 2002 10:59:03 -0800
Message-ID: <F001.004D8188.20020924105903@fatcity.com>


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_at_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_at_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_at_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_at_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_at_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_at_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). Received on Tue Sep 24 2002 - 13:59:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US