ORA-3136エラー解析-WARNING Inbound Connection Timed Out

6276 ワード

概要
 
WARNING: inbound connection timed out (ORA-3136)
このエラーは以前に発生したことがありません.今朝、お客様はMSNにいました.彼のOracle Serverは忙しいので、alertでこのエラーメッセージが頻繁に発生し、接続が成功しませんでした.次はalertファイルのエラーメッセージです.
......
Wed Feb 27 09:03:02 2008 Completed checkpoint up to RBA [0x184d.2.10], SCN: 1203810646 Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:03:27 2008 WARNING: inbound connection timed out (ORA-3136) Wed Feb 27 09:04:30 2008 Incremental checkpoint up to RBA [0x184d.e5a6.0], current log tail at RBA [0x184d.43aaa.0] Wed Feb 27 09:05:02 2008
......
 
このWARNINGは私は以前接触したことがありませんが、字面からconnect time outであるべきで、以前よく見られたのはORA-12170です.だからとても退屈です.
 
初歩的な分析
 
1)listenerを検査する.oraとsqlnet.oraのパラメータ設定、その他の異常は見つかりません
    $ cat listener.ora

    ################

    # Filename......: listener.ora

    # Name..........:

    # Date..........:

    ################

    ADMIN_RESTRICTIONS_LISTENER = on

    LISTENER =

        (ADDRESS_LIST =

           (ADDRESS =

             (PROTOCOL = IPC)

             (KEY = HS5.WORLD)

           )

           (ADDRESS=

             (PROTOCOL = IPC)

             (KEY = HS5)

           )

           (ADDRESS =

             (COMMUNITY = SAP.WORLD)

             (PROTOCOL = TCP)

             (HOST = GVSHS5DB)

             (PORT = 1527)

          )

       )

    STARTUP_WAIT_TIME_LISTENER = 0

    CONNECT_TIMEOUT_LISTENER = 10

    TRACE_LEVEL_LISTENER = OFF

    SID_LIST_LISTENER =

      (SID_LIST =

        (SID_DESC =

           (SID_NAME = HS5)

           (ORACLE_HOME = /oracle/HS5/102_64)

        )

      )



    $ cat sqlnet.ora

    ################

    # Filename......: sqlnet.ora

    ################

    AUTOMATIC_IPC = ON

    TRACE_LEVEL_CLIENT = OFF

    NAMES.DEFAULT_DOMAIN = WORLD

    # 05.01.06 unsorported parameter now 

    #NAME.DEFAULT_ZONE = WORLD

    # 05.01.06 set the default to 10 

    SQLNET.EXPIRE_TIME = 10

    # 05.01.06 set to default 

    #TCP.NODELAY=YES 

    # 05.01.06 set to 32768 

    DEFAULT_SDU_SIZE=32768



    $


2)topas,vmstatにより,現在のシステムの負荷が高く,cpuは基本的に100%(略)であることがわかる.
従って、システム負荷が重すぎるため接続timeoutが発生したと初歩的に判断できる.
 
さらに分析
 
このWARNINGは以前見たことがないので、Oracle関連資料を直接調べました.もともとこれは10 gR 2に新たに加わった属性で、SQLNETを通過することができる.INBOUND_CONNECT_TIMEOUTで設定しますが、デフォルトでは60秒です.
 
このWARNINGの主な原因は、
1)Server gets a connection request from a malicious(悪意)client which is not supposed to connect to the database,in which case the error thrown is the correct behavior.You can get the client address for which the error was thrown via sqlnet log file. 2)The server receives a valid client connection request but the client takes a long time to authenticate more than the default 60 seconds. 3)The DB server is heavily loaded due to which it cannot finish the client logon within the timeout specified.  
では、このWARNINGが現れたのはどのように位置づけられているのでしょうか.
 
The default value of 60 seconds is good enough in most conditions for the database server to authenticate a client connection. If its taking longer period, then its worth checking all the below points before going for the workadound:1. Check whether local connection on the database server is sucessful & quick.2. If local connections are quick ,then check for underlying network delay with the help of your network administrator.3. Check whether your Database performance has degraded by anyway.4. Check alert log for any critical errors for eg, ORA-600 or ORA-7445 and get them resolved first. These critical errors might have triggered the slowness of the database server.As a workaround to avoid only this warning messages, you can set the parameters SQLNET.INBOUND_CONNECT_TIMEOUT and INBOUND_CONNECT_TIMEOUT_ to the value more than 60.
For e.g 120. So that the client will have more time to provide the authentication information to the database. You may have to further tune these parameter values according to your setup. To set these parameter1. In server side sqlnet.ora file add SQLNET.INBOUND_CONNECT_TIMEOUT For e.g SQLNET.INBOUND_CONNECT_TIMEOUT = 120 2. In listener.ora file - INBOUND_CONNECT_TIMEOUT_ = 110 For e.g if the listener name is LISTENER then - INBOUND_CONNECT_TIMEOUT_LISTENER = 110 Note:From Oracle version 10.2.0.3 onwards the default value of INBOUND_CONNECT_TIMEOUT_ is 60 seconds. For previous releases it is zero by default.How to check whether inbound timout is active for the listener and database server
For eg. INBOUND_CONNECT_TIMEOUT_ =4You can check whether the parameter is active or not by simply doing telnet to the listener port.$ telnet
for eg.$ telnet 192.168.12.13 1521The telnet session should disconnect after 4 seconds which indicates that the inbound connection timeout for the listener is active.To check whether database server sqlnet.inbound_connect_timeout is active: Eg. sqlnet.inbound_connect_timeout =5 a. For Dedicated server setup, enable the support level sqlnet server tracing will show the timeout value as below:niotns: Enabling CTO, value=5000 (milliseconds) <== 5 seconds niotns: Not enabling dead connection detection. niotns: listener bequeathed shadow coming to life...b. For shared Server setup, $ telnet For eg.$ telnet 192.168.12.13 51658The telnet session should disconnect after 5 seconds which indicates that the sqlnet.inbound_connection_timeout is active.
回転元:http://tomszrp.itpub.net/post/11835/467438