Listener死掉的一些原因

来源:互联网 发布:键盘记录软件 隐蔽 编辑:程序博客网 时间:2024/05/17 22:26
Why the listener hangs.

This is a very important section for hung listeners. There are manycases
where a rouge client may be causing the listener to hang. Thisscenario
happens almost all of the time. When a client sends it's connectdata, if the
total packet length is greater than 230 bytes, SQL*Net on theclient will
break up the packet into 2 pieces: a 50 byte connect packet, and asecond packet
continuing connect data. When a client sends the connect request toa TNS
listener, a procedure called nsanswer() is invoked. When nsanswer()gets the
connect packet, the listener will wait in a blocking mode for theconnect
data to arrive. Usually, the connect data arrives after the 50 byteconnect
packet. The question is, what happens to the listener if theconnect data
never arrives? As an example, imagine that at connect time with aWindows 95
application, the application GPFs, but just before the GPF, a 50byte connect
packet left the client. The listener s nsanswer() is invoked, andis now
waiting for connect data. Connect data never arrives because of theGPF on
the client. What happens to the listener? The listener is "hung" ina read
state forever waiting for connect data. Theoretically, this can befixed by
setting connect_timeout_listener to a value greater than 0 in thelistener.ora
file. After connect_timeout_listener seconds have passed, thelistener should
completely drop the connection request, and be available to accepta new
connection. As a test, you can TELNET to a listener which willinvoke
nsanswer(). Since TELNET does not send any TNS connect information,both the
TELNET and the listener will not return to a normal statusuntil
connect_timeout_listener has beenreached. If connect_timeout_listener is
set to 0, the listener will hang forever.
 
 

 总结也就是在listener.ora文件设置connect_timeout_listener的值大于0

 

Solution: Oracle DB 10g listener hangs
Listener can hang for many reasons:

1. listener.log file is too big ( > 2 GB)
2. Bugs (10g R1 - 10.1.0... is very bugy!!!)
3. Change of IP or domain name of the computer

In 10g also the listener can "simulate" no activity.
Definitly you have to check if the service is registered by theListener:

% lsnrctl services

If you do not see the service that is the reason. In this casedo
a statisc registration. I have posted many posts about this.

Other reasons:

1. Firewall (s) either on client on on server
2. Antivirus program

http://software.allfaq.org/forums/t/117189.aspx

0 0