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;
数据库版本为默认的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.