记一次生产故障,数据库报错:WARNING: inbound connection timed out (ORA-3136)

来源:互联网 发布:单片机矩阵键盘原理图 编辑:程序博客网 时间:2024/06/07 12:48

公司某系统近几天频繁宕机,查看数据库后台之日:

Mon Aug 21 08:58:30 CST 2017
WARNING: inbound connection timed out (ORA-3136)
Mon Aug 21 08:58:45 CST 2017
WARNING: inbound connection timed out (ORA-3136)
Mon Aug 21 08:58:46 CST 2017
WARNING: inbound connection timed out (ORA-3136)
Mon Aug 21 08:59:16 CST 2017
WARNING: inbound connection timed out (ORA-3136)
Mon Aug 21 08:59:16 CST 2017
WARNING: inbound connection timed out (ORA-3136)
Mon Aug 21 08:59:16 CST 2017
WARNING: inbound connection timed out (ORA-3136)
Mon Aug 21 08:59:16 CST 2017
WARNING: inbound connection timed out (ORA-3136)

然后看sqlnet.log也有类似的报错:

Fatal NI connect error 12170.
VERSION INFORMATION:
        TNS for Linux: Version 10.2.0.5.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 10.2.0.5.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 10.2.0.5.0 - Production
  Time: 21-AUG-2017 09:26:26
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12606
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
  Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.0.x.x)(PORT=4425))

看上去是时间超时了,于是百度了下,修改两个参数:

1.listener.ora

把参数设置成 INBOUND_CONNECT_TIMEOUT_LISTENER=0

因为我的数据库为动态注册监听,没有这个文件,所以直接在命令行修改

[oracle@callcenterdb517 bdump]$ lsnrctl 

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 21-AUG-2017 10:37:48
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:
rawmode                     displaymode                 
rules                       trc_file                    
trc_directory               trc_level                   
log_file                    log_directory               
log_status                  current_listener            
inbound_connect_timeout     startup_waittime            
snmp_visible                save_config_on_stop         
dynamic_registration        
LSNRCTL> show inbound_connect_timeout
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "inbound_connect_timeout" set to 60
The command completed successfully
LSNRCTL> set inbound_connect_timeout 0

2.sqlnet.ora文件

SQLNET.INBOUND_CONNECT_TIMEOUT 0

这个参数是指客户端连接数据库服务认证的时间长,即用户连接DB的时间的,单位是秒。 当client 在INBOUND_CONNECT_TIMEOUT指定的时间内没有成功连接上服务器(db 负载大,网络延时等原因)。

如果库没有这个文件,从sample里面复制一个出来

3.重新加载监听

reload一下


阅读全文
0 0