昨天有一套生产RAC 的一个节点的数据库实例自动宕机,然后又很快自动恢复正常状态。随即依次检查了一下数据库 alert 日志, ASM alert 日志和集群 alert 日志。发现 ASM alert 日志和集群 alert 日志中在宕机的时间点并没有重要特殊的信息提供。而在数据库 alert 日志中发现了以下信息:
IPC Send timeout detected. Receiver ospid 31266 [
Sun Jan 24 06:07:59 2021
Errors in file /u01/app/oracle/diag/rdbms/racdb/racdb3/trace/racdb3_lmon_31266.trc:
Sun Jan 24 06:08:48 2021
Detected an inconsistent instance membership by instance 4
Sun Jan 24 06:08:48 2021
Sun Jan 24 06:08:48 2021
Received an instance abort message from instance 4Received an instance abort message from instance 4
Please check instance 4 alert and LMON trace files for detail.
Please check instance 4 alert and LMON trace files for detail.
LMS0 (ospid: 31270): terminating the instance due to error 481
Sun Jan 24 06:08:48 2021
System state dump requested by (instance=3, osid=31270 (LMS0)), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/racdb/racdb3/trace/racdb3_diag_31256_20210124060848.trc
Instance terminated by LMS0, pid = 31270
Sun Jan 24 06:09:00 2021
Starting ORACLE instance (normal)
根据数据库 alert 日志提供的信息,可以得知,此时发生了 IPC 超时检测,并将本地数据库实例驱逐出集群,然后本地数据库实例又正常启动了。
当 IPC Send timeout detected 发生时, "netstat" 状态会显示 "packet reassembles failed" (重组包失败),检查如下:
$ cd /oracle/app/grid/tfa/repository/suptools/x38503/oswbb/grid/archive/oswnetstat/
检查是否有很多 "packet reassembles failed" 现象
$ grep -ni 'packet reassembles failed' x38503_netstat_21.01.24.0600.dat
3283: 2671396 packet reassembles failed
3438: 2672065 packet reassembles failed
3593: 2672586 packet reassembles failed
3748: 2673032 packet reassembles failed
3903: 2673516 packet reassembles failed
4058: 2674057 packet reassembles failed
4213: 2674852 packet reassembles failed
4368: 2675658 packet reassembles failed
4523: 2675980 packet reassembles failed
4678: 2676232 packet reassembles failed
.........
8708: 2680307 packet reassembles failed
8863: 2680666 packet reassembles failed
大量的 "packet reassembles failed" 可能会导致两种现象
1. 节点驱逐
2. 在发生节点驱逐后,如果没有重启产生 "packet reassembles failed" 的节点,实例或节点将不会自动加入集群
根据MTU ( Maximum Transmission Unit )的尺寸,大的 UDP 数据包可能被分片,并在多个帧中发送。这些零散的数据包需要在接收节点上重新组合。高 CPU 使用率(持续的或者是频繁的峰值),过小的 reassembly buffer 也会导致块重组失败。在接收节点 ' netstat -s ' 输出的 "IP Statistics" 部分提示有大量 的 "reassembles failed" 信息。分片的报文需要在指定时间内完成重组( reassemble )。没有能够完成重组的分片报文会被丢弃并要求重传。已经收到,但是由于空间不足没有进行重组的数据分片会被直接丢弃。
解决方法如下, 增加reassemble buffer 尺寸,给重组分配更多的空间。方法如下:
# vi /etc/sysctl.conf
net.ipv4.ipfrag_high_thresh = 16777216 (default = 196608)
net.ipv4.ipfrag_low_thresh = 15728640 (default = 262144)
# sysctl -p -- 使参数生效
---- end ----
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31529886/viewspace-2753522/,如需转载,请注明出处,否则将追究法律责任。