zoukankan      html  css  js  c++  java
  • 加载到SGA中的库缓存对象超过阈值

    开发同事在群里反馈,客户的生产库中有报错信息:
    memory notification: library cache object loaded into sga
    heap size 512346k exceeds notification threshold (51200k).
    并将trc文件发了过来。

    image
    通过搜索 497b0fa4 找到libraryhandle Address=0x20683af20的SQL。
    image
    继续搜索找到了子游标的LibraryHandle。
    image
    sql的子游标总数达到了4543,并且也给记录了不能共享的原因是Bind mismatch,可以通过动态性能视图v$sql_bind_capture和v$sql_shared_cursor查出绑定变量的值,再来找出不能共享的最终原因。另外MOS上有文档对此问题的详细说明。
    Memory Notification: Library Cache Object loaded into SGA / ORA-600 [KGL-heap-size-exceeded] (Doc ID 330239.1)

    These are warning messages that are not causing process failure. They appear as a result of event messaging mechanism and memory manager introduced starting with 10gR2 database release. As large objects in the shared pool can potentially cause problems this warning threshold was implemented. Items/SQLs which allocate more space than this warning threshold, outputs a warning to the alert log. This warning is only to inform that a given heap object exceeds the defined threshold size and a trace file is generated so that a DBA can check potentially expensive - from shared memory point of view - objects. These are purely warning messages and have no impact on the database functionality, although they are designed to indicate possible tuning opportunities in customers' applications. The messages do not imply that an ORA-4031 is about to happen immediately unless the size of shared pool is very small.

    这些是不会导致进程失败的警告消息。 它们是事件消息传递机制和内存管理器从10gR2数据库版本开始引入的结果。 由于共享池中的大型对象可能会导致问题,因此实现了此警告阈值。 分配的空间大于此警告阈值的sql将向警告日志输出警告。 此警告只是通知给定的堆对象超过了定义的阈值大小,并生成跟踪文件,以便DBA可以从共享内存的角度检查潜在的昂贵对象。 这些纯粹是警告消息,对数据库功能没有影响,尽管它们被设计用来指示客户应用程序中可能的调优机会。 除非共享池的大小非常小,否则这些消息并不意味着即将发生ORA-4031。

    由于客户生产环境管理的比较严格,不能登录服务器,只是需要对此给出建议,根据以上的信息分析,由于SQL不能共享导致子游标数量大量增长达到4543个,占用的内存超出了隐含参数控制的阈值50M,alert日志中记录了此警告信息,给出如下建议:
    1、设置隐含参数限制SQL子游标数量
    alter system set "_cursor_obsolete_threshold"=1024 scope=spfile;
    2、通过动态性能视图v$sql_bind_capture和v$sql_shared_cursor查出该SQL绑定变量的值,找出不能共享的根本原因,优化此SQL。

  • 相关阅读:
    ABP学习之路--切换mysql数据库
    关于网站发布后站点访问404的问题
    关于COOKIE在本地可以正常写入发布后不能写入浏览器的问题
    关于CSS层叠样式(颜色+边框+文本属性)
    HTML 自学笔记(HTML框架+表单设计)
    HTML 自学笔记(HTML表格相关标记)
    HTML 自学笔记(HTML的图像标记+超链接的使用)
    HTML 自学笔记(HTML的基本结构+文档设置标记)
    .net的页面在大并发下偶尔出现503错误
    WebService:The remote server returned an error: (400) Bad Request
  • 原文地址:https://www.cnblogs.com/historynote/p/15324566.html
Copyright © 2011-2022 走看看