业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下

Tue Sep  ::
WARNING: inbound connection timed out (ORA-)
Tue Sep ::
WARNING: inbound connection timed out (ORA-)
Tue Sep ::
WARNING: inbound connection timed out (ORA-)
Tue Sep ::
WARNING: inbound connection timed out (ORA-)

数据库历史session统计如下

                                               latch: shared pool
library cache: mutex X
library cache: mutex X
6hurnha5k9qb6 latch: shared pool
latch: shared pool
0rs4yunhszr7w latch: shared pool
b7fy2a0snpja9 library cache: mutex X
null event
latch: shared pool
0rs4yunhszr7w latch: shared pool
library cache: mutex X
6hurnha5k9qb6 latch: shared pool
b7fy2a0snpja9 library cache: mutex X
latch: shared pool
library cache: mutex X
null event
latch: shared pool
latch: shared pool
0rs4yunhszr7w latch: shared pool
b7fy2a0snpja9 library cache: mutex X
6hurnha5k9qb6 latch: shared pool
library cache: mutex X
library cache: mutex X

阻塞会话明细

SQL>  select event,sql_id,USER_ID,program   from gV$active_session_history a where INST_ID= and SESSION_ID=  and to_char(a.sample_time, 'yyyymmddHH24mi')=;
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002) SQL> select event,sql_id,USER_ID,program from gV$active_session_history a where INST_ID= and SESSION_ID=352and to_char(a.sample_time, 'yyyymmddHH24mi')=;
EVENT SQL_ID USER_ID PROGRAM
------------------------------ ------------- ---------- ------------------------------------------------
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)

MMAN进程是Oracle 10g引入用于进行内存管理的进程,在进行动态内存调整时,这个进程要发挥其作用,这个进程的作用是内部数据库任务的执行者:MMAN is used for internal database tasks.
MMAN to wait and post itself for satisfying an auto-tuned memory request while trying to fully free a component's quiesced granules. In Release 10.1, the name of this event was 'wait for SGA component shrink'.
在后台转储跟踪,可以看到MMAN进程的等待:

WAIT #: nam='SGA: MMAN sleep for component shrink' ela=  component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=

查询数据库最近内存调整记录

SQL> select COMPONENT,
2 STATUS,
3 OPER_TYPE,
4 OPER_MODE,
5 PARAMETER,
6 round(INITIAL_SIZE/1024/1024,2) INITIAL_mb ,
7 round(TARGET_SIZE/1024/1024,2) TARGET_MB,
8 round(FINAL_SIZE/1024/1024,2) FINAL_mb,
9 to_char(START_TIME, 'yyyy-mm-dd hh24:mi:ss') START_TIME,
10 to_char(END_TIME, 'yyyy-mm-dd hh24:mi:ss') END_TIME
11 from V$MEMORY_RESIZE_OPS
12 where START_TIME > to_date('','yyyymmddhh24')
13 order by END_TIME;
COMPONENT STATUS OPER_TYPE OPER_MODE PARAMETER INITIAL_MB TARGET_MB FINAL_MB START_TIME END_TIME
------------------------------ --------- ------------- --------- ------------------------------ ---------- ---------- ---------- ------------------- -------------------
shared pool COMPLETE SHRINK DEFERRED shared_pool_size 2752 2624 2624 2017-09-26 22:01:21 2017-09-26 22:10:07
DEFAULT buffer cache COMPLETE GROW DEFERRED db_cache_size 1536 1664 1664 2017-09-26 22:01:21 2017-09-26 22:10:07
DEFAULT buffer cache COMPLETE SHRINK DEFERRED db_cache_size 1664 1536 1536 2017-09-26 22:23:11 2017-09-26 22:23:13
shared pool COMPLETE GROW DEFERRED shared_pool_size 2624 2752 2752 2017-09-26 22:23:11 2017-09-26 22:23:13

至此问题定位,是由于SGA内存自动调整导致数据库异常

Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例的更多相关文章

  1. library cache: mutex X

    我们先来看看 library cache: mutex X . 是个什么东西 The library cache mutex is acquired for similar purposes that ...

  2. Troubleshooting 'library cache: mutex X' Waits. (Doc ID 1357946.1)

    In this Document   Purpose   Troubleshooting Steps   What is a 'library cache: mutex X' wait?   What ...

  3. [20190402]Library Cache mutex.txt

    [20190402]Library Cache mutex.txt 1.环境:SCOTT@book> @ ver1PORT_STRING                    VERSION   ...

  4. 11g等待事件之library cache: mutex X

    11g等待事件之library cache: mutex X 作者: dbafree 日期: 2012 年 07 月 01 日发表评论 (0)查看评论   library cache: mutex X ...

  5. Troubleshooting 'library cache: mutex X' Waits.

    What is a 'library cache: mutex X' wait? The mutex feature is a mechanism to control access to in me ...

  6. Oracle数据库学习笔记(一)

      Oracle的体系结构大体上分为两部分:Instance(实例)和Database(数据库). Instance(实例) :在Oracle Instance中主要包含了SGA以及一些进程(例如:P ...

  7. Oracle Shared Pool 原理

    Oracle Shared Pool 原理 由于shared pool中最重要的是library cache,所以本文主要讲解Library cache的结构,library cache latch, ...

  8. Oracle内存详解之 Library cache 库缓冲

    Oracle内存详解之 Library cache 库缓冲 2017年11月09日 11:38:39 阅读数:410更多 个人分类: 体系结构 Library cache是Shared pool的一部 ...

  9. Oracle内存详解之二 Library cache 库缓冲-转载

    Library cache是Shared pool的一部分,它几乎是Oracle内存结构中最复杂的一部分,主要存放shared curosr(SQL)和PLSQL对象(function,procedu ...

随机推荐

  1. js获取当前日期,格式为YYYY-MM-DD

    //获取当前时间,格式YYYY-MM-DD function getNowFormatDate() { var date = new Date(); var seperator1 = "-& ...

  2. winform代码生成器(二)

    代码下载 地址 http://pan.baidu.com/s/1nuZjyat 接着说 上文继续说,这次我们要生成主从表. 此方用到了第三方的 控件 DevExpress 的Gridview .大家可 ...

  3. 将代码托管到github,并生成链接访问

    转眼间加入github的阵营已经两年多了,看到别人建立的个人博客挺好看的,因此,自己从此喜欢上了github,总结下自己的相关知识. 推荐学习Git的网址: 猴子都能懂的GIT入门 http://ba ...

  4. OC与JS交互之WebViewJavascriptBridge

    上一篇文章介绍了通过UIWebView实现了OC与JS交互的可能性及实现的原理,并且简单的实现了一个小的示例DEMO,当然也有一部分遗留问题,使用原生实现过程比较繁琐,代码难以维护.这篇文章主要介绍下 ...

  5. PHP常用的一些数组操作总结

    1.array_values() :返回包含数组中所有键值的数组,不保留键名. 2.array_diff() 函数返回两个数组的差集数组.该数组包括了所有在被比较的数组中,但是不在任何其他参数数组中的 ...

  6. js之generate

    generator(生成器)是ES6标准引入的新的数据类型.一个generator看上去像一个函数,但可以返回多次. ES6定义generator标准的哥们借鉴了Python的generator的概念 ...

  7. qt打开url

    QDesktopServices::openUrl(QUrl(QLatin1String(“http://blog.const.net.cn“)))

  8. (二)selenium元素定位

    selenium定位方法 Selenium提供了8种定位方式. id name class name tag name link text partial link text xpath css se ...

  9. 2017软件测试_HW1_最近遇到的编程问题

     最近遇到的错误:我对着网页源代码编写了一段爬虫语句,运行没有提示有错误,而且 可以抓取到全部的数据,但是不能按照要求将这些数据分到制定的位置. 发现问题原因:我把抓取到的字段对着网页源码看了一下,发 ...

  10. CRM中间件里的CSA队列有什么用

    我们有时候会在中间件的事务码SMQ2即Inbound队列查看器里观察到以CSA开头的队列: 这些队列的作用是什么呢?在SAP community上已经有很多朋友提出了相同的问题,也有专家在下列两个连接 ...