概述
-----
在11g版本之前,RAC数据库中一个实例无法与其他实例通信,数据库实例将会被集群驱逐(Evict),同时Alert Log伴随错误信息:ORA-29740: evicted by instance number string, group incarnation string
从11g版本开始,RAC数据库功能又有了显著的增强,例如增加了本地实例进程之间的状态监控,LMHB进程定时监控本实例中其他核心进程(LMON/LMD/LMS/LCK等)状态,如果LMHB发现核心进程在允许的时间内(默认70秒)没有响应,那么LMHB进程会重启该数据库实例,以防止问题影响到整个集群,同时Alert Log伴随错误信息ORA-29770。因此错误信息ORA-29770只是问题的结果而不是原因,分析问题原因需要检查LMHB trace文件。
下面是 Oracle 官方文档中关于ORA-29770的解释:
ORA-29770: global enqueue process string (OSID string) is hung for more than string seconds
Cause: The specified process mades no progress within the maximum allowed time.
Action: Check the alert file and relevent trace files and contact Oracle Support Services with the incident information.
常见原因
---------
• OS资源不足,导致进程无法正常工作。
•无法获得数据库资源,导致进程一直处于等待状态。
•进程处于ON CPU 或者 Spin 状态。
案例
--------
- 下面 Alert log 错误信息说明LMHB进程发现LMON进程在70秒时间内没有响应:
LMON (ospid: 62062756) waits for event 'control file sequential read' for 83 secs.
Errors in file /home/oracle/app/oracle/diag/rdbms/ora/ora1/trace/ora1_lmhb_62259296.trc (incident=416304):
ORA-29770: global enqueue process LMON (OSID 62062756) is hung for more than 70 seconds
Incident details in: /home/oracle/app/oracle/diag/rdbms/ora/ora1/incident/incdir_416304/ora1_lmhb_62259296_i416304.trc
ERROR: Some process(s) is not making progress.
LMHB (ospid: 62259296) is terminating the instance.
- LMHB trace (ora1_lmhb_62259296.trc)错误信息说明LMON进程在等待IO,等待时间1分43秒超过了阀值70秒:
Current Wait Stack:
0: waiting for 'control file sequential read'
file#=0x0, block#=0x23, blocks=0x1
wait_id=75328 seq_num=9829 snap_id=1
wait times: snap=1 min 43 sec, exc=1 min 43 sec, total=1 min 43 sec
wait times: max=infinite, heur=1 min 43 sec
wait counts: calls=0 os=0
in_wait=1 iflags=0x5a0
因此建议检查系统IO,另外,在11.2低版本中也有类似的已知问题会导致ORA-29770,建议安装最新patch set (11.2.0.4) 和最新PSU。
Patch set和PSU信息请参考:Oracle Recommended Patches -- Oracle Database (Doc ID 756671.1)
参与此主题的后续讨论,请回复blog,或者访问我们的中文社区,跟帖"分享:RAC 性能分析 - ORA-29770"。