Oracle Listener监听风暴处理
经验值:大于25-30连接每秒,监听会出现延迟,故,从连接数量上开始分析。
监听日志信息分析统计:
listener.log:
07-JUN-2016 23:43:05 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.12)(PORT=24740)) * establish * test * 0
07-JUN-2016 23:43:05 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.11)(PORT=34342)) * establish * test * 0
07-JUN-2016 23:43:05 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.10)(PORT=29580)) * establish * test * 0
07-JUN-2016 23:43:05 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.8)(PORT=57261)) * establish * test * 0
07-JUN-2016 23:43:05 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.17)(PORT=55967)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.59.18)(PORT=33403)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.10)(PORT=29608)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.13)(PORT=54767)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.10)(PORT=29633)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.10)(PORT=29657)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.12)(PORT=24792)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.14)(PORT=47378)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.18)(PORT=27881)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.59.8)(PORT=43086)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.60.9)(PORT=37928)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.59.10)(PORT=46469)) * establish * test * 0
07-JUN-2016 23:43:06 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=app))(service_name=test)(failover_mode=(type=select)(method=basic))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxxx.59.9)(PORT=46237)) * establish * test * 0
fgrep "29-JUN-2016 20:10" listener_a.log|fgrep "establish"|awk -F* '{print $1 " " $3}'|awk -F= '{ print $1 " " $4}'|sed -e 's/......$//g'| awk '{print $1 " " $2 " " $4}'|cut -b-20,21- |sort |uniq -c|sort -n +0
3 08-JUN-2016 00:00 xxxx.141.52
3 08-JUN-2016 00:00 xxxx.141.53
2 08-JUN-2016 00:00 xxxx.141.54
17 08-JUN-2016 00:00 xxxx.141.56
16 08-JUN-2016 00:00 xxxx.141.57
3 08-JUN-2016 00:00 xxxx.141.58
8 08-JUN-2016 00:00 xxxx.141.59
13 08-JUN-2016 00:00 xxxx.141.61
19 08-JUN-2016 00:00 xxxx.141.70
16 08-JUN-2016 00:00 xxxx.145.148
15 08-JUN-2016 00:00 xxxx.145.32
11 08-JUN-2016 00:00 xxxx.145.39
15 08-JUN-2016 00:00 xxxx.145.46
14 08-JUN-2016 00:00 xxxx.145.57
18 08-JUN-2016 00:00 xxxx.146.21
1 08-JUN-2016 00:00 xxxx.146.33
12 08-JUN-2016 00:00 xxxx.44.23
6 08-JUN-2016 00:00 xxxx.44.24
1 08-JUN-2016 00:00 xxxx.44.25
6 08-JUN-2016 00:00 xxxx.44.26
7 08-JUN-2016 00:00 xxxx.44.27
7 08-JUN-2016 00:00 xxxx.44.28
6 08-JUN-2016 00:00 xxxx.45.132
6 08-JUN-2016 00:00 xxxx.45.133
7 08-JUN-2016 00:00 xxxx.45.134
7 08-JUN-2016 00:00 xxxx.45.135
11 08-JUN-2016 00:00 xxxx.59.10
6 08-JUN-2016 00:00 xxxx.59.11
11 08-JUN-2016 00:00 xxxx.59.12
6 08-JUN-2016 00:00 xxxx.59.13
12 08-JUN-2016 00:00 xxxx.59.14
8 08-JUN-2016 00:00 xxxx.59.17
2 08-JUN-2016 00:00 xxxx.59.18
4 08-JUN-2016 00:00 xxxx.59.31
54 08-JUN-2016 00:00 xxxx.59.32
3 08-JUN-2016 00:00 xxxx.59.33
8 08-JUN-2016 00:00 xxxx.59.38
2 08-JUN-2016 00:00 xxxx.59.39
27 08-JUN-2016 00:00 xxxx.59.4
53 08-JUN-2016 00:00 xxxx.59.5
12 08-JUN-2016 00:00 xxxx.59.8
16 08-JUN-2016 00:00 xxxx.59.9
9 08-JUN-2016 00:00 xxxx.60.10
9 08-JUN-2016 00:00 xxxx.60.11
9 08-JUN-2016 00:00 xxxx.60.12
4 08-JUN-2016 00:00 xxxx.60.13
11 08-JUN-2016 00:00 xxxx.60.14
5 08-JUN-2016 00:00 xxxx.60.17
15 08-JUN-2016 00:00 xxxx.60.18
12 08-JUN-2016 00:00 xxxx.60.32
7 08-JUN-2016 00:00 xxxx.60.33
5 08-JUN-2016 00:00 xxxx.60.35
13 08-JUN-2016 00:00 xxxx.60.8
14 08-JUN-2016 00:00 xxxx.60.9
3 08-JUN-2016 00:00 xxxx.61.23
处理方法:
1) 增大QUEUESIZE
Latest default queue sizes (as of 2016):
Solaris default QUEUESIZE is 32
Aix default QUEUESIZE is 1024
Linux Default QUEUESIZE is 128
Windows XP (Professional) default QUEUESIZE is 10
Windows Server default QUEUESIZE is 200
LISTENER =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521)(QUEUESIZE = 1024))
)
2)调整连接为长连接(通过中间件或自建连接池方式),缓解监听压力。