monitor@crm1:/oracle/app/oracle/product/9.2/network/log>tnsping boss1
TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production on 29-JUN-2007 15:00:02
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/oracle/app/oracle/product/9.2/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp)(host = 192.168.0.2)(port = 1521))) (CONNECT_DATA = (SID = boss1)))
OK (1650 msec)
monitor@crm1:/oracle/app/oracle/product/9.2/network/log>tnsping boss1
TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production on 29-JUN-2007 15:00:05
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/oracle/app/oracle/product/9.2/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp)(host = 192.168.0.2)(port = 1521))) (CONNECT_DATA = (SID = boss1)))
OK (1590 msec)
查询视图v$session 发现:
select to_char(LOGON_TIME,'yyyy-mm-dd hh24:mi:ss'),PROGRAM,sid, username,status,osuser from v$session where status='ACTIVE' and username is not null and to_char(LOGON_TIME,'yyyy-mm-dd hh24:mi:ss')>'2007-06-29 11:10:00' order by LOGON_TIME,SCHEMANAME,PROGRAM;
2007-06-29 11:07:41 RPubPower@AS2 (TNS V1-V3) 228 PROG_USER ACTIVE boss1
2007-06-29 11:07:41 RPubPower@AS2 (TNS V1-V3) 2617 PROG_USER ACTIVE boss1
2007-06-29 11:07:41 RPubPower@AS2 (TNS V1-V3) 3015 PROG_USER ACTIVE boss1
2007-06-29 11:07:42 RPubPower@AS2 (TNS V1-V3) 828 PROG_USER ACTIVE boss1
2007-06-29 11:07:42 RPubPower@AS2 (TNS V1-V3) 2584 PROG_USER ACTIVE boss1
2007-06-29 11:07:44 RPubPower@AS2 (TNS V1-V3) 1789 PROG_USER ACTIVE boss1
2007-06-29 11:07:44 RPubPower@AS2 (TNS V1-V3) 1858 PROG_USER ACTIVE boss1
2007-06-29 11:07:44 RPubPower@settle1 (TNS V1-V3) 999 PROG_USER ACTIVE boss1
2007-06-29 11:07:44 RPubPower@settle1 (TNS V1-V3) 2287 PROG_USER ACTIVE boss1
2007-06-29 11:07:44 RPubPower@settle1 (TNS V1-V3) 1257 PROG_USER ACTIVE boss1
我们看出RPubPower服务产生很多的短连接,造成的监听端口的压力,导致了连接沿时。经确定此服务是28日晚新上业务,程序中会产生大量的短连接。后应用人员进行了修改,将短连接变成长连接。现象消失。
tnsping">monitor@crm1:/tmp>tnsping boss1 20
TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production on 29-JUN-2007 17:04:06
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
/oracle/app/oracle/product/9.2/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp)(host = 192.168.0.2)(port = 1521))) (CONNECT_DATA = (SID = boss1)))
OK (110 msec)
OK (50 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (10 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
tnsping">monitor@crm1:/tmp>tnsping boss2 10
TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production on 29-JUN-2007 17:23:15
Copyright (c) 1997 Oracle Corporation. All rights reserved
Used parameter files:
/oracle/app/oracle/product/9.2/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp)(host = 1192.168.0.1)(port = 1521))) (CONNECT_DATA = (SID = boss2)))
OK (60 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (10 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec)
OK (0 msec
如果应用不能轻易修改的话我们可以用使用多个监听的方法来缓解监听端口的压力
在服务器端:配置多个listener,每个listener走不同的端口;
在客户端,配置tnsnames.ora文件,如下:
boss1 =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE=ON)
(FAILOVER=ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1523))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1524))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1526))
)
(CONNECT_DATA =
(SERVICE_NAME = boss)
)
)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9650775/viewspace-923227/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9650775/viewspace-923227/