现象:数据库服务及监听运行正常,但打开功能模块非常慢; 处理过程: 一 检查数据库alert_oaxx.log日志 日志切换并不高,无报错;数据库负载不大; 二 检查数据库状态 服务和监听均运行正常,sqlplus / as sysdba登陆正常,会话数正常 . 检查系统启动时间 初始安装日期: 2015/5/13, 12:09:51 系统启动时间: 2018/6/14, 3:11:06 检查网络连接,发现大量close_wait,由进程327000引起,经判断为360tray
TCP 10.25.136.5:52667 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52668 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52669 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52672 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52674 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52675 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52676 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52677 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52678 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52680 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52681 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52682 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52683 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52684 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52686 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52688 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52690 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52691 221.130.200.53:80 CLOSE_WAIT 327000
TCP 10.25.136.5:52692 221.130.200.53:80 CLOSE_WAIT 327000
三 检查数据库等待事件 无等待 ; 四 做tnsping发现:
C:\Users\Administrator>tnsping oadb
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-5月 -
2019 15:05:04
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的参数文件:
Y:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =10.xx.1xx.5)(PORT = 15
22)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = oadb)))
OK (51910 毫秒)
延迟很高,停用360tray
C:\Users\Administrator>tnsping oadb
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-5月 -
2019 14:58:23
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的参数文件:
Y:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-5K0CGNM3EQV)(PORT
= 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = oadb)))
OK (24950 毫秒)
降至25秒,但还是很高,ping 主机,发现延迟很低,禁用ipv6,效果还是一样; C:\Users\Administrator>ping 10.25.136.5
正在 Ping 10.25.136.5 具有 32 字节的数据: 来自 10.25.136.5 的回复: 字节=32 时间<1ms TTL=64 来自 10.25.136.5 的回复: 字节=32 时间<1ms TTL=64 另发现应用日志存在网络连接超时
url=jdbc:oracle:thin:@10.2x.1x6.x:xxx:oadb;user=bxxx;pwd=xxx
java.sql.SQLException: Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186
646784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
检查sqlnet.ora无明显异常; 五 检查数据库监听,重启监听,无改善,查看监听日志发现,日志在2019-04-06 2 点以后无更新 产生有大量trace:
** DBGRL Error: Text Alert Log
** DBGRL Error: SLERC_OERC, 48184
** DBGRL Error: OSD-00002: 附加错误信息
O/S-Error: (OS 87) 参数错误。
** DBGRL Error: 06-4月 -2019 02:01:39 * (CONNECT_DATA=(SID=xxdb)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=1xxxxx)(PORT=60839)) * establish * oadb * 0
Trace file y:\oracle\diag\tnslsnr\WIN-5K0CGNM3EQV\listener\trace\ora_895324_893720.trc
** DBGRL Error: Text Alert Log
** DBGRL Error: SLERC_OERC, 48184
** DBGRL Error: OSD-00002: 附加错误信息
O/S-Error: (OS 87) 参数错误。
** DBGRL Error: 系统参数文件为Y:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
查看listner.log发现其有4GB,在win 下存在如下问题: WINDOWS: Listener Hangs & Lsnrctl Commands Are Slow or Hang (文档 ID 1319797.1) Bug 9879101 : THE CONNECT THROUGH LISTENER WAS SLOW WHEN LISTNER LOG GROWED 4GB 处理办法: 1 停上监听,重命名原监听文件, y:\oracle\diag\tnslsnr\WIN-5K0CGNM3EQV\listener\trace\ listener.bak.log 新建一个listener.log