ORA-04031 Memory Errors with Argument KGLH0^
(Doc ID 2096561.1)
Last updated on MARCH 08, 2021
Applies to:Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 22.214.171.124 and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
A high amount of memory was allocated into KGLH0 heap of shared pool, this frequently leading to ORA-4031 errors. The shared pool size is large enough and the size of KGLH0 is significant compared with the size of shared pool size. The growth is also constant in time and sometimes can stabilize to a large value without getting ORA-4031.
KGLH0 refers to memory associated with the heap descriptor for a library cache object, specifically heap 0. It is most commonly associated with cursors but also is allocated for other objects.
To monitor top pool allocations in shared pool, you can run following query:
select name, round((bytes/1024/1024),0) MB
from v$sgastat where pool='shared pool'
and bytes > 10000000
order by bytes desc
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