This article discusses the internal error "ORA-4031", what it means and possible actions. The information here is only applicable to the versions listed and is provided only for guidance.
This note is intended for general audience as initial starting point for beginning diagnosis of ORA-4031.
Missed size request signified by %s bytes
Arguments within parenthesis ("%s","%s","%s"):
First argument: SGA pool area such as Shared pool, Large pool, Java pool, Streams pool
Second argument: Code running at the time space request was made
Third and Fourth argument: Memory allocations being requested
Known Bugs
You can restrict the list below to issues likely to affect one of the following versions by clicking the relevant button:
NB Bug Fixed Description 17752995 12.1.0.2, 12.2.0.0 ORA-4031 from explain of SQL with many subqueries and OR expansion 17037130 12.1.0.2, 12.2.0.0 Excess shared pool "PRTMV" memory use / ORA-4031 with partitioned tables 16816103 11.2.0.4, 12.1.0.1.1, 12.1.0.2, 12.2.0.0 XIN aborts with ORA-4031 due to memory leak in OCIXStreamInCommit 16710753 11.2.0.4, 12.1.0.2, 12.2.0.0 Excess shared pool memory use / ORA-4031 from DROP EDITION 16571785 11.2.0.4, 12.1.0.2, 12.2.0.0 High "KTC latch subh" SGA memory use due to "lobs commit callback" 13951456 12.1.0.2, 12.2.0.0 ASMCMD does not use bind variables in its SQL - affects shared pool 16009158 11.2.0.3.BP19, 11.2.0.4, 12.1.0.1 ORA-4031 / excess shared pool memory using Securefiles 15931756 11.2.0.3.BP21, 11.2.0.4, 12.1.0.1 ORA-4031 / Queries against SYS_FBA_TRACKEDTABLES not shared (do not use binds) 8673737 11.2.0.4, 12.1.0.1 Diagnostic enhancement to summarize sub-pool allocations in ORA-4031 trace files 14053298 11.1.0.6 "kksss-heap" memory leak from PMON cleanup (ORA-4031) when audit enabled 15881004 11.2.0.4, 12.1.0.1 Excessive Memory usage with Extended Cursor Sharing 14292825 11.2.0.3.BP10, 11.2.0.4, 12.1.0.1 ORA-4031 in ASM as default memory parameters values for 11.2 ASM instances low 14029050 11.2.0.2.BP18, 11.2.0.3.BP10, 11.2.0.4, 12.1.0.1 MMAN failing to donate granules despite unused PGA (possible ORA-4031) 14003090 11.2.0.3.8, 11.2.0.3.BP20, 11.2.0.4, 12.1.0.1 ORA-4031 with high memory utilization in the 'init_heap_kfsg' subheap / "ASM map headers" under 'init_heap_kfsg' 13814739 11.2.0.3.7, 11.2.0.3.BP19, 11.2.0.4, 12.1.0.1 Excessive KQR X PO" allocations in a RAC environment (can cause ORA-4031) 13536971 12.1.0.1 ORA-4031 with large partition tables - superseded 13456573 11.2.0.4, 12.1.0.1 Many child cursors / ORA-4031 with large allocation in KGLH0 using extended cursor sharing 13430938 11.2.0.3.4, 11.2.0.3.BP10, 11.2.0.4, 12.1.0.1 ORA-4031 with high "KTC latch subh" memory usage 13255388 11.2.0.4, 12.1.0.1 Slow parsing of large number of subqueries eligible for coalescing. 13250244 11.2.0.2.8, 11.2.0.2.BP18, 11.2.0.3.4, 11.2.0.3.BP10, 11.2.0.4, 12.1.0.1 Shared pool leak of "KGLHD" memory when using multiple subpools 13072654 11.2.0.3.8, 11.2.0.3.BP21, 11.2.0.4, 12.1.0.1 Unnecessary ORA-4031 for "large pool","PX msg pool" from PQ slaves 12387969 11.2.0.3, 12.1.0.1 get_geometry() does not use bind variables internally leading to shared pool fragmentation 11782790 11.2.0.3, 12.1.0.1 Excess CPU & memory use / ORA-4030 / ORA-4031 parsing deeply nested queries 11651810 11.2.0.2.3, 11.2.0.2.BP07, 11.2.0.3, 12.1.0.1 ORA-4031 or Excess shared pool use can be seen by FileOpenBlock objects 11063191 11.2.0.2.7, 11.2.0.2.BP17, 11.2.0.3.2, 11.2.0.3.BP04, 11.2.0.4, 12.1.0.1 ORA-4031 with hint /*+ CURSOR_SHARING_EXACT */ - excessive "KKSSP^nn" memory 10634096 11.2.0.3, 12.1.0.1 excessive memory usage with grouping sets and temp table transformation 10359631 11.2.0.3, 12.1.0.1 High elapsed time and shared pool usage during parse with virtual columns 10325953 11.2.0.3, 12.1.0.1 ORA-600[733] / ORA-4031 allocating memory for hash join - superceded 10308906 11.2.0.3, 12.1.0.1 ORA-4031 using structured binary XMLIndex 10089333 11.2.0.2.6, 11.2.0.2.BP15, 11.2.0.3, 12.1.0.1 "init_heap_kfsg" memory leaks in SGA of db instance using ASM 10082277 11.2.0.1.BP12, 11.2.0.2.3, 11.2.0.2.BP04, 11.2.0.3, 12.1.0.1 Excessive allocation in PCUR or KGLH0 heap of "kkscsAddChildNo" (ORA-4031) 10042937 11.2.0.3, 12.1.0.1 High memory group in ges_cache_ress and ORA-4031 errors in RAC 9578670 11.2.0.1.BP11, 11.2.0.2.5, 11.2.0.2.BP09, 11.2.0.2.GIPSU05, 11.2.0.3, 12.1.0.1 ORA-4031 from frequent Partition Maintenance Operation 9403026 11.2.0.2, 12.1.0.1 Startup or PQ can report ORA-4031 errors requesting large "PX msg pool" chunks of memory 9320130 10.2.0.5.3, 11.2.0.2, 12.1.0.1 ORA-4031 for "temporary tabl" using temporary table transformations (STAR / WITH) 9015983 11.2.0.1.1, 11.2.0.2, 12.1.0.1 ORA-4031 for "temporary tabl" on query with star transformation 8934457 11.2.0.2, 12.1.0.1 ORA-4031 during EXPLAIN PLAN or ORA-4030 during SELECT 8835591 11.2.0.2, 12.1.0.1 Excess memory use parsing invalid SQL with COUNT() in subquery select list 8813366 11.1.0.7.3, 11.2.0.1.1, 11.2.0.1.BP04, 11.2.0.2, 12.1.0.1 ORA-4031 due to over large granule size 8537544 11.2.0.2, 12.1.0.1 Excess memory use / ORA-600 / dumps parsing SQL with many nested outer joins / ANSI joins 7509451 11.2.0.3.7, 11.2.0.3.BP19, 11.2.0.4, 12.1.0.1 SGA memory leak possible for "KSN WaitID" memory when using shared servers 13548390 11.2.1.8.8 Error 4031 in kgttusec - plsql memory > 1g unreliable 9026008 11.2.0.1.BP02, 11.2.0.2, 12.1.0.1 "GES_RESOURCES" may increase over time with high enqueue activity 9058900 11.2.0.1.BP10, 11.2.0.2 OERI [kcbi_get_bhs_4] / "Shared IO Pool" takes too much SGA memory 8599477 11.1.0.7.3, 11.2.0.1 Large "kcbi io desc" shared pool allocations can lead to ORA-4031 8528171 10.2.0.5.6, 11.1.0.7.10, 11.2.0.1 High shared pool use due to frequent ADD/EXCHANGE partition operations 8371884 10.2.0.5, 11.2.0.1 Dumps/Errors/Excessive Parse Time and Memory allocation with Star transformation 8244734 10.2.0.5, 11.1.0.7.8, 11.2.0.1 NUMA Pool misconfigured at startup (ORA-4031) 8221425 11.1.0.7.2, 11.2.0.1 ORA-4031 with kgs-heap overusing one subpool 7462463 10.2.0.5, 11.2.0.1 R-tree Index based spatial query on large table fails with ORA-4031 / ORA-7445 [kghualloc] 7443808 11.2.0.1 Excessive Shared Memory utilization during Query Parsing 7340448 10.2.0.4.1, 10.2.0.5, 11.1.0.7.1, 11.2.0.1 Excess shared pool memory use / ORA-4031 from REGEXP_LIKE - superceded 7250182 11.2.0.1 Excess shared pool memory for AQ ("kwqiccns: notification st" chunks) 7207921 10.2.0.5, 11.2.0.1 State object leak / ORA-4031 from stale guess DBAs on secondary IOT index 7031622 10.2.0.5, 11.2.0.1 Spin on kkojnp / ORA-600 [15160] with Star transformation 6868080 10.2.0.5, 11.1.0.7, 11.2.0.1 ORA-4031 with NUMA 6858062 10.2.0.4.1, 10.2.0.5, 11.1.0.7.5, 11.2.0.1 Shared pool memory leak when services created / deleted 6800507 10.2.0.4.1, 10.2.0.5, 11.1.0.7, 11.2.0.1 Shared pool memory leak ("ksws service *" memory) using EXPDP often 6730567 10.2.0.5, 11.2.0.1 ORA-4031 / OERI [17137] with NUMA optimization enabled 6624011 11.1.0.7, 11.2.0.1 ORA-4030 / ORA-4031 on startup with > 4Gb SGA_TARGET 6530861 10.2.0.5, 11.2.0.1 ORA-4301 when using stored Java 6334552 10.2.0.4, 11.1.0.7, 11.2.0.1 Hang / ORA-4031 / OERI:kfrcsoDelete_3 on rollback of ASM file resize 6271590 10.2.0.4.2, 10.2.0.5, 11.1.0.7, 11.2.0.1 SGA subheap imbalance with lots of free memory in a few subheaps 6086162 11.2.0.1 Slow parsing / Excessive Memory Usage with Star Transformation and Query Rewrite 6126415 11.1.0.7 OERI [kjccgmb:1] during shutdown instance 6011182 10.2.0.4, 11.1.0.7 Parsing of large query takes long time / memory leak / ORA-4030 /4031 5386986 10.2.0.4, 11.1.0.7 Leak / ORA-4031 leak when DROP UNUSED COLUMN issued on large partitioned table 13888380 ORA-4031 in DB instance when using ASM due to high use of "init_heap_kfsg" memory 10363436 Memory leak / ORA-4031 using TDE column encryption with PKI keys 12808696 11.1.0.6 Shared pool memory leak of "hng: All sessi" memory 7306915 10.2.0.4.4, 10.2.0.5, 11.1.0.6 EXCHANGE PARTITION leaks "KGL handles" shared pool memory 6043052 10.2.0.4, 11.1.0.6 Leak in perm allocations with "library cache" comments (ORA-4031) 6001617 10.2.0.4, 11.1.0.6 LCK may accumulate CPU time / ORA-4031 possible 5950708 10.2.0.4, 11.1.0.6 'gcs resources' and 'gcs shadows' are imbalanced across shared pool subpools 5618049 10.2.0.4, 11.1.0.6 "mvobj part des" leaked memory after partition DDL (ORA-4031) 5573238 10.2.0.4, 11.1.0.6 Shared pool memory use / ORA-4031 due to "obj stat memo" in one subpool 5548510 10.2.0.4, 11.1.0.6 _FIX_CONTROL parameter leaks memory in the shared pool 5548389 10.2.0.4, 11.1.0.6 Library cache allocation for 'column mapping' not using uniform sized extents 5508505 10.2.0.4, 11.1.0.6 ORA-4031 while shared heap still has unused reserved extents 5479172 10.2.0.4, 11.1.0.6 ORA-4031 with multiple partially-allocated permanent chunks 5377973 10.2.0.4, 11.1.0.6 Register schema fails with ORA-4031 5240264 11.1.0.6 ORA-4030 / ORA-4031 / Excessive Memory Usage with view merging and large IN LISTs. 4994956 10.2.0.3, 11.1.0.6 Number of configured shared pool subpools not correct 4467058 10.2.0.4, 11.1.0.6 IO requests can flush the pool / signal a hidden ORA-4031 error 3519807 9.2.0.8, 10.1.0.5, 10.2.0.2, 11.1.0.6 ORA-4031 querying V$SEGSTAT 3291723 10.2.0.3, 11.1.0.6 DBWR may crash instance if shared pool memory low 6347725 "obj stat mem" leak when global temporary tables used 4195175 9.2.0.7, 10.1.0.5, 10.2.0.1 Create MVIEW with large WHERE clause may dump / ORA-4031 4184298 10.1.0.5, 10.2.0.1 Subpool imbalance for "session parameters" can lead to ORA-4031 3948384 9.2.0.7, 10.1.0.4, 10.2.0.1 ORA-4031 possible using LGWR ASYNC for archiving 3513427 10.1.0.3, 10.2.0.1 ORA-4031 can cause many SGA heapdumps to occur causing shared pool latch contention 3419396 10.2.0.1 Restore spfile with dummy instance from ASM fails with RMAN-20001 / ORA-4031 3405237 9.2.0.6, 10.1.0.3, 10.2.0.1 ORA-4031 / excessing SGA consumption due to large IN LIST and NOT IN list 3356492 10.2.0.1 DBMS_LOB.LOADFROMFILE leaks library cache locks / shared pool "perm" memory 3299407 9.2.0.6, 10.1.0.3, 10.2.0.1 Invalidating cursors frequently can fragment the SGA and leak "kglau" memory 3046725 10.2.0.1 ORA-4031 due to shared_pool fragmented with high ges resources & enqueues 2953931 9.2.0.4, 10.2.0.1 ORA-4031 parsing query with numerous groupings * 4658188 9.2.0.8 Long waits for "ksu process alloc latch yield" 4231921 9.2.0.8, 10.1.0.2 Truncate partition tables leaks SGA memory 3232401 9.2.0.5, 10.1.0.2 ORA-4031 with Streams apply site + 3150705 9.2.0.5, 10.1.0.2 Fix to help reduce the chances of an ORA-4031 with high OPEN_CURSORS 3150680 9.2.0.5, 10.1.0.2 Excessive shared pool permanent memory use / ORA-4031 possible with SESSION_CACHED_CURSORS 3083818 10.1.0.2 Reloaded cursors can leak shared pool memory 3077651 9.2.0.5, 10.1.0.2 LOB manipulation can leak "buffer" state objects causing hangs/shared pool problems 2846138 10.1.0.2 Dump (under opiosq0) from SVRMGRL sessions when shared pool is full 2817728 9.2.0.4, 10.1.0.2 Shared pool memory leak / ORA-4031 when collecting segment statistics 2804724 9.2.0.4, 10.1.0.2 Out of memory in JAVA POOL shows an ORA-4031 "shared pool" message 2798851 9.2.0.4, 10.1.0.2 ORA-4031 possible from SMON during SHUTDOWN or STARTUP 2793038 9.2.0.4, 10.1.0.2 Session may die with ORA-4031 if shared pool exhausted when storing object level statistics 2786968 9.2.0.4, 10.1.0.2 Shared pool memory leak / ORA-4031 on repeated invalidate/execute of cursors 2607029 9.2.0.3, 10.1.0.2 High memory use optimizing SQL with functional indexes and many expressions 2586762 9.2.0.3, 10.1.0.2 Direct LOB reads can result in ORA-4031 / excessive shared pool usage 2563301 9.2.0.5, 10.1.0.2 ORA-4031 possible in RAC environment under load 2561115 9.2.0.5, 10.1.0.2 SGA memory growth using outbound TCP/IP database links from shared servers 2523151 9.2.0.3, 10.1.0.2 ORA-7445[updexe] with AUDIT_TRAIL=DB with stressed shared pool 2501591 9.2.0.3, 10.1.0.2 ORA-928 / ORA-4031 on "ALTER VIEW COMPILE" if REMOTE objects exist with same name 2486954 9.2.0.3, 10.1.0.2 ORA-4031 / Dump from concurrent DGURIServlet access to SQLX XMLType view 2351854 9.0.1.4, 9.2.0.2, 10.1.0.2 Dispatchers may hang if ORA-4031 occurs 1782381 9.2.0.5, 10.1.0.2 Excessive SGA use / ORA-4031 possible with large number of JOBS 2805335 9.2.0.4 Excessive shared pool memory use for parse of certain statments using functional indexes 2442042 9.2.0.5 ORA-4031 possible using STREAMS on multi-cpu machine 2472541 9.2.0.2 PMON ORA-7445 [kghxfr] after shared server gets ORA-4031 2244789 9.0.1.4, 9.2.0.1 ORA-4031 / excessive shared pool usage from query with full outer join / union 2244642 9.0.1.4, 9.2.0.1 ALTER VIEW operations may encounter ORA-4031 errors 2208570 8.1.7.4, 9.0.1.4, 9.2.0.1 ORA-4030 / ORA-4031 / spin during query optimization with STAR TRANSFORMATION and unmergable view 2185294 9.2.0.1 Shared server may dump (koklhfr) after ORA-4031 in "LARGE POOL" 2167326 9.0.1.3, 9.2.0.1 ORA-4031 possible during patch set upgrade scripts 2143637 9.0.1.3, 9.2.0.1 ORA-4031 possible starting the cache advisory 2129178 8.1.7.4, 9.0.1.3, 9.2.0.1 Using NULL or an empty string ('') in an INLIST can cause ORA-4031 / waste shared pool memory 2104071 8.1.7.4, 9.0.1.3, 9.2.0.1 ORA-4031 / excessive "miscellaneous" shared pool use possible (many PINS) 1865917 8.1.7.3, 9.0.1.2, 9.2.0.1 ORA-4031 / high CPU from OR expansion of negated predicates with RBO 1333526 8.1.7.3, 9.0.1.2, 9.2.0.1 ORA-4031 / Poor performance using persistent Object data types 1642964 9.0.1.0 ORA-4031 / sga leak from IOT as inner table in NESTED LOOP 1640583 8.1.7.1, 9.0.1.0 ORA-4031 due to leak / cache buffer chain contention from AND-EQUAL access + 1397603 8.1.7.2, 9.0.1.0 ORA-4031 / SGA memory leak of PERMANENT memory for buffer handles 1396675 8.1.7.2, 9.0.1.0 PLSQL may hang/spin/ORA-4031 with SQL WHERE (a,b) in ( (c1,d1),(c2,d2)... ) 1340718 8.1.7.2, 9.0.1.0 OERI:KCBSTC_PARENT_AB possible in CKPT following an ORA-4031 error 1348501 8.1.6.3, 8.1.7.0 MV refresh unnecessarily invalidates shared cursors 1328709 8.0.6.2, 8.1.6.3, 8.1.7.0 OERI:15428 can be raised when ORA-4031 is hit internally 1256011 8.0.6.2, 8.1.6.2, 8.1.7.0 MTS servers may OERI:1113 after an ORA-4031 (OERI:730 on 8i) 1092621 8.1.6.2, 8.1.7.0 ORA-4031 when DROPPING a PARTITION 898798 8.1.5.1, 8.1.6.0 ORA-4031 on startup from large DB_BLOCK_BUFFERS (or GC_RELEASABLE_LOCKS) 431303 7.3.3.1, 7.3.4.0 Startup gives ORA-4031 with GC_DB_LOCKS=157K
- '*' indicates that an alert exists for that issue.
- '+' indicates a particularly notable issue / bug.
- 'P' indicates a port specific bug.
- "OERI:xxxx" may be used as shorthand for ORA-600 [xxxx].