ORA-04031 error with high allocation for "HEAP0: KGL" =>"KKXPR" in shared pool. (Doc ID 1079936.1)

Last updated on NOVEMBER 08, 2010

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.4 - Release: 10.2 to 10.2
Information in this document applies to any platform.

Symptoms

ORA-04031 error encountered.

The heap dump from trace file is seen as below:

HEAP DUMP heap name="sga heap(1,0)" desc=3800299a8

Type Count Sum Average
~~~~ ~~~~~ ~~~ ~~~~~~~
R-freeable 166 648280 3905.30
R-perm 3 357688 119229.33
R-free 59 43502320 737327.46
free 121919 69722288 571.87
freeable 588409 659942192 1121.57
recreate 6658 9440016 1417.85
perm 3076 105367824 34254.82
R-recreate 1 207176 207176.00

BreakDown
~~~~~~~~~
Type Count Sum Average Percent
~~~~ ~~~~~ ~~~ ~~~~~~~ ~~~~~~~
reserved stoppe 106 5088 48.00 0.00
perm 3079 105725512 34337.61 11.89
Free(heap.awk) 121978 113224608 928.24 12.73
PL/SQL MPCODE 81 343048 4235.16 0.04
Heap0: KGL 580787 645919512 1112.15 72.64 ===========>High

---> HEAP DUMP heap name="Heap0: KGL" desc=41a29e150

Type Count Sum Average
~~~~ ~~~~~ ~~~ ~~~~~~~
free 543548 98941728 182.03
freeable 2352296 522559120 222.15
perm 1 400 400.00

BreakDown
~~~~~~~~~
Type Count Sum Average Percent
~~~~ ~~~~~ ~~~ ~~~~~~~ ~~~~~~~
Free(heap.awk) 543548 98941728 182.03 15.92
kkxpr 2352296 522559120 222.15 84.08 ==============>High
perm 1 400 400.00 0.00

The query from v$sgastat shows as below:

SQL> select * from v$sgastat where pool like 'shared%' order by bytes;

POOL NAME BYTES
------------ -------------------------- ----------
shared pool db_block_hash_buckets 11796480
shared pool ASH buffers 16252928
shared pool free memory 126163416
shared pool Heap0: KGL 626726264 -----------High

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms