Home » ORA-04030: out of process memory when trying to allocate 4152 bytes

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

by tuanlp

 

ORA-04030: out of process memory when trying to allocate 4152 bytes (8475.kgghte,8475.kgghte)

Error
In our case, we are getting the error in alert log during normal production timing:

Mon Jan 07 10:13:31 2019
Unable to allocate memory for new incident error in file E:ORACLE12Cdiagrdbmsorclorcltraceorcl_ora_5976.trc:
ORA-04030: out of process memory when trying to allocate 20520 bytes (pga heap,KTI PGA static small pool)
Mon Jan 07 10:13:31 2019
Errors in file E:ORACLE12Cdiagrdbmsorclorcltraceorcl_ora_5976.trc:
ORA-04030: out of process memory when trying to allocate 20520 bytes (pga heap,KTI PGA static small pool)

Cause
On checking the DB allocated memory target is 1.7 GB which is very less. That’s why allocate memory error is generated in alert log.

Solution
We are using database, it minimum memory target should be 3 GB. We increased the size of Memory_target parameter.
Then after monitoring the database. We never faced the error again.

For increased the Memory target parameter:

SQL> show parameter memory_target

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
memory_target big integer 1.7G

SQL> alter system set memory_target = 3G scope=spfile;

SQL>Shutdown immediate
SQL>Startup

On LINUX and UNIX System
If ORA-04030: out of process memory error occurred at Linux or Unix Environment then we need to check the ulimit -a command for check limit should be unlimited if we have sufficent enough physical memory.


For example the ulimits can be changed to unlimited
% ulimit -c unlimited (turn on corefiles with unlimited size)
% ulimit -n unlimited (allows an unlimited number of open file)
% ulimit -d unlimited (sets the user data limit to unlimited)
% ulimit -f unlimited (sets the file limit to unlimited)

You can sel all records to unlimited. Set the ulimits of all the components to unlmited. These can be set at the system level using configuration file /etc/security/limits.
See the following /etc/security/limits:

oracle:
fsize = -1
core = -1
cpu = -1
data = =-1
stack = -1
rss = -1
nofiles = -1
core_hard=-1
cpu_hard=-1
data_hard=-1
fsize_hard=-1

Note: -1 represent unlimited value

You may also like