Friday, January 15, 2016

ORA-04030: out of process memory when trying to allocate

What is ORA-04030?
  • This error indicates that the oracle server process is unable to allocate more memory from the operating system.
  • This memory consists of the PGA (Program Global Area) and its contents depend upon the server configuration.
  • For dedicated server processes it contains the stack and the UGA (User Global Area) which holds user session data, cursor information and the sort area. 
  • In a multithreaded configuration (shared server), the UGA is allocated in the SGA (System Global Area) and will not be responsible for ORA-4030 errors.
  • This ORA-04030 can be caused by a shortage of RAM on a dedicated (non shared server) environment, a too small PGA, and by not setting kernel parameters large enough to allow enough RAM.
What will happen?
  • We can't allocate more memory from the operating system.
Query to find out the memory usage for processes from the OS


SELECT SID,NAME,VALUE FROM  v$statname n,v$sesstat s WHERE    n.STATISTIC# = s.STATISTIC# AND NAME LIKE 'session%memory%'  ORDER BY 3 ASC;

How to avoid?

  • Get more memory or reduce your need for memory
  • Increase pga_aggregate_target
  • Decrease sort_area_size and/or hash_area_size

No comments:

Post a Comment