oracle 19c数据库W00n进程使用很多PGA内存资源的分析

今天,客户反馈测试环境的数据库PGA资源不足,报错ORA-04036: 实例使用的 PGA 内存超出 PGA_AGGREGATE_LIMIT;分析是多个W00n进程使用大量PGA-触发了BUG,对应解决办法就是打补丁。(民间办法就是KILL进程、重启数据库),如下为分析过程:

报错信息:

java.sql.SQLException: ORA-04036: 实例使用的 PGA 内存超出 PGA_AGGREGATE_LIMIT at
 oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at
  oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at
   oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at
    oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at
     oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at
      oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)   oracle@localhost:/u01/app/oracle/diag/rdbms/cdb1/cdb1/trace$
       oerr ora 4036 04036, 00000, "PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT" // 
       *Cause: Private memory across the instance exceeded the limit specified // in the PGA_AGGREGATE_LIMIT initialization parameter. The largest // 
       sessions using Program Global Area (PGA) memory were interrupted // 
       to get under the limit. // *Action: Increase the PGA_AGGREGATE_LIMIT initialization parameter or reduce 
       // memory usage.     pga_aggregate_limit limit of aggregate PGA memory consumed by the instance  

问题分析:

查看总的PGA分布:select sum(pga_alloc_mem)/(1024*1024) "Mbytes allocated", sum(pga_used_mem)/(1024*1024) "Mbytes used" from v$process;

查找占用内存多的进程:使用SQL;

SELECT DECODE(TRUNC(SYSDATE - LOGON_TIME), 0, NULL, TRUNC(SYSDATE - LOGON_TIME) || ' Days' || ' + ') ||
TO_CHAR(TO_DATE(TRUNC(MOD(SYSDATE-LOGON_TIME,1) * 86400), 'SSSSS'), 'HH24:MI:SS') LOGON,
SID, v$session.SERIAL#, v$process.SPID , ROUND(v$process.pga_used_mem/(1024*1024), 2) PGA_MB_USED,
v$session.USERNAME, STATUS, OSUSER, MACHINE, v$session.PROGRAM, MODULE
FROM v$session, v$process
WHERE v$session.paddr = v$process.addr ORDER BY 4 DESC ;

数据库版本为默认的19.3,未安装RU补丁包。分析此进程,是触发了BUG:Bug 30098251 - WNNN PROCCESSES CREATE AN EXCESSIVE NUMBER OF OPEN CURSORS investigated the issue where Wnnn process has high number of open cursors and consuming more memory.

关于此BUG的描述是:

Each Wnnn Background Process is consuming around 140MB of pga ( can be more as well) and holding hundreds of opened
cursors causing memory usage of instance to go high.
The sessions appear to remain open (session state ACTIVE), holding these cursors.
The Wnnn and SMCo processes appear to remain active for weeks at a time, as we can seen by logon time.

解决办法是:

1、民间办法:KILL进程、或者定期重启数据库。
2、官方办法:SOLUTION:
1. Apply Patch 30098251 available for your release and platform
OR
2. Upgrade to below releases where the fix for 30098251 is first included.
20.1.0
19.6.0.0.200114 (Jan 2020) Database Release Update (DB RU)
18.9.0.0.200114 (Jan 2020) Database Release Update (DB RU)
12.2.0.1.200114 (Jan 2020) Database Release Update (DB RU)
12.1.0.2.200114 (Jan 2020) Database Proactive Bundle Patch
12.2.0.1.200114 (Jan 2020) Bundle Patch for Windows Platforms
There is no workaround for this issue.

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-21 21:10:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-21 21:10:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-21 21:10:02       87 阅读
  4. Python语言-面向对象

    2024-04-21 21:10:02       96 阅读

热门阅读

  1. js生成word

    2024-04-21 21:10:02       37 阅读
  2. 大数据:【学习笔记系列】Flink基础架构

    2024-04-21 21:10:02       37 阅读
  3. MariaDB简介

    2024-04-21 21:10:02       39 阅读
  4. 数仓建模—数据模型

    2024-04-21 21:10:02       39 阅读
  5. 怎样把pandas.core.frame.DataFrame数据写入excel文件?

    2024-04-21 21:10:02       31 阅读
  6. Elasticsearch:(二)1.安装Elasticsearch

    2024-04-21 21:10:02       34 阅读
  7. 分布式锁选型指南:Redis与ZooKeeper的较量与融合

    2024-04-21 21:10:02       38 阅读
  8. Linux下git维护

    2024-04-21 21:10:02       35 阅读
  9. 技术成长ing

    2024-04-21 21:10:02       35 阅读
  10. 解读神秘的华为昇腾910

    2024-04-21 21:10:02       33 阅读
  11. 前端面试01总结

    2024-04-21 21:10:02       31 阅读
  12. BERT 微调中文 NER 模型

    2024-04-21 21:10:02       31 阅读