My Oracle Support Banner

ORA-04031 Due To Excessive Growth In KGLH0 Heaps (Doc ID 1351675.1)

Last updated on JANUARY 30, 2022

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.2 [Release 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.3 [Release 11.2]
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

In an 11.2 database, the "KGLH0" heap seems overallocated, leading in time to an ORA-4031 error.

KGLH0 associated with the SQL Area in the Shared Pool.  Each child cursor consumes KGLH0.
Large allocation in KGLH0 can occur due to many child cursors and a lack of sharing of the parent cursor.

The trace file generated with the ORA-04031 error shows large allocations of the KGLH0 heap chunks:

===============================
Memory Utilization of Subpool 1
===============================
Allocation Name Size
___________________________ ____________
"free memory "                 101779936
"SQLA "                           390848
"KGLH0 "                       653554600  <<<
===============================
Memory Utilization of Subpool 2
===============================
Allocation Name Size
___________________________ ____________
"free memory "                  61765736
"SQLA "                        310364504
"KGLH0 "                       250430528  <<<



When witnessing a high allocation for the KGLH0 heap chunks in the trace file , a heap dump can be taken to get more detailed information:


In this case the main culprit is memory allocations of the "kkscsAddChildNo" type.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.