11.2.0.3 RAC数据库m000进程报错ORA-04031错误的解决
原创
©著作权归作者所有:来自51CTO博客作者wb94a78wq170rt0的原创作品,请联系作者获取转载授权,否则将追究法律责任
用户一个稳定运行很久的数据库,ALERT日志中突然报出大量ORA-04031错误,业务未有反馈异常;
按以前处理此类问题的思路,首先看报错日志及对应TRACE-AAABBB_m000_898.trc,是数据库后台进程的。 报错信息持续是ORA-04031: unable to allocate 4160 bytes of shared memory ("shared pool","unknown object","sga heap(2,0)","modification ")
从TRACE文件中,从这里可以看到是从shared pool分配4160BYTE时出错,对应的是子池:sga heap(2,0) 从TRACE文件中定位到相应的子池信息,FREE内存还是几百M,其它子池基本也是这情况。
从ALERT日志的报错来看,问题持续在整点时刻,由于m000是MMON的SLAVE进程运行刷新AWR基表相关数据的,这个报错时点与此进程的功能也能匹配,由于此进程错误AWR的快照也没生成;手动做AWR快照时仍然是此报错。
直观感觉会不是数据库BUG? 从MOS上查了一通,没有特别匹配的。做为数据库三方维保的,没有确认BUG不要紧,关键是问题能解决或缓解啊;这时候多年的经验发挥了作用,与客户沟通手动KILL掉MMON进程,手动做快照,正常完成;后面观察几天,未再出现此问题。 这
个问题一开始看是ORA-4031错误,只有后台进程m000报错问题也没有通用的官方文档/BUG等来参考,最终通过对数据库一些机制和过往经验,KILL MMON进程来解决,处理思路比较符合"黑猫白猫抓到老鼠都是好猫",有点偏方治病的感觉哈哈,当然处理问题思路才是重要的,毕竟“鲁迅”说过在错误的道路上奔跑也没有用;周六又一次加班结束,记录一下! 相关日志信息供参考,如下:
ALERT日志中信息
Wed Mar 27 11:00:27 2019
Errors in file /app/oracle/diag/rdbms/AAABBB/trace/AAABBB_m000_898.trc (incident=795752):
ORA-04031: unable to allocate 4160 bytes of shared memory ("shared pool","unknown object","sga heap(2,0)","modification ")
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /app/oracle/diag/rdbms/AAABBB/trace/AAABBB_m000_898.trc (incident=795753):
ORA-04031: unable to allocate ORA-04031: unable to allocate 4160 bytes of shared memory ("shared pool","unknown object","sga heap(2,0)","modification ")
bytes of shared memory ("","","","")
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
TRC文件中Memory Utilization of Subpool 2信息:
Memory Utilization of Subpool 2
================================
Allocation Name Size
___________________________ ____________
"free memory " 376909800
"miscellaneous " 480
"dpslut_kfdsg " 0
"gcs res latch table " 12800
"file state object " 0
"RULST " 0
"sql area " 0
"UNDO INFO HASH " 96864
"vem_user_actlog " 0
"event classes " 1552
"txncallback " 82384
"write state object " 2558136
"transaction " 1134096
"ufgtab_kfmdsg " 0
"Wait History Array " 0
"vproblem_bucket " 0
"gcs delta freelist " 0
"KJCTS implicit batching s" 0
"KJCTS process batching st" 0
"gc lock contexts " 460800
"row cache " 37768
"id:ksu_register_trcid " 0
"temporary tabl " 0
"KCB buffer wait statistic" 32768
"KCB incremental ckpt entr" 0
"KCB tablespace encryption" 912
"invalid low rba queue " 2336
"KGSKI scheduler heap 1 de" 232
"SMODI " 40040
"dbkea msg body " 7168
"resumable " 3648
"KESTB existence bitvec se" 2048
"dbgefgHtInit-1 " 256
"relmd_ext " 1224
"enqueue_hash " 265872
"KSXP OSD MISC Stats buffe" 56848
"KSXP osd misc table colum" 6208
"KTCN: Obj Invalidation Se" 24608
………………