oracle监听防止连接风暴,Oracle Listener 监听风暴处理

本文分析了OracleListener在高并发(每秒25-30连接)下出现的延迟问题,通过监听日志解析,提出增大QUEUESIZE和调整为长连接的解决方案。涉及的关键操作包括grep、awk、sort等工具在统计分析中的应用。
摘要由CSDN通过智能技术生成

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)调整连接为长连接(通过中间件或自建连接池方式),缓解监听压力。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值