Below are some possible solutions for the ORA-04030 error. However, as the solutions are implemented at the Operating System or Oracle database level, please engage RSA Customer Support for RSA-provided database if you need help with the troubleshooting steps. For customer-supplied database, please engage your local Oracle DBA team.
Operating system limit
On the Linux platform, there is a known issue relating to the max map count setting, located in the file /proc/sys/vm/max_map_count. The procedure for confirming that the Oracle process has exceeded the value in the max_map_count file is documented in Oracle Support Note 1325100.1 :PLSQL Procedure Causing ORA-4030 Errors.
Simply put, what needs to be confirmed is how many lines are between the following two tag lines in the ORA-04030 trace file:
----- Process Map Dump -----
******************* End of process map dump ***********
This count then needs to be compared to the value in the file: /proc/sys/vm/max_map_count. Once it has been confirmed that the number of lines in the Oracle Process Map Dump exceeds the value in the max_map_count file, then the setting can be reviewed and changed with the following commands.
- Login as root.
- Review the current setting.
# more /proc/sys/vm/max_map_count 65530
- Increase the max. map count. For example:
# sysctl -w vm.max_map_count=131060 vm.max_map_count = 131060
If the Oracle database is running on a non-Linux platform (for example, IBM AIX), then it is not supplied by RSA, so please contact your local Oracle DBA.
Over-allocation
Over-allocation is when the memory allocated to the Oracle database, and the memory consumed by non-Oracle processes, exceeds the memory available to the operating system. For example (true story):
- The Linux operating system had 16GB of RAM installed.
- The Oracle database MEMORY_TARGET was set to 14GB
- The root user was using 5GB of memory.
- After some time, the Oracle database reported an ORA-04030 error.
1. How much RAM is there?
First, we need to know how much RAM the operating system has available, using the free command.
# free total used free shared buffers cached Mem: 18405600 18215380 190220 0 224244 6843656 -/+ buffers/cache: 11147480 7258120 Swap: 8388604 2964 8385640
In this example, the system the system has 18,405,600 bytes, or 16GB of RAM.
2. How much memory are the non-Oracle user processes using?
Use the following command to determine the virtual memory size of all the non-Oracle processes.
vsz is the virtual memory size of the process in KiB (1024-byte units).
ps -e h -o ruser,vsz |grep -v oracle | awk '{total = total + $2}END{print total}'
However, if you wish to capture the results into a file to examine usage per user, then use this command.
ps -e -o ruser,group,pid,vsz,comm | grep -v oracle > virt_mem_size.txt
3. How much memory is WildFly using?
Use the following command to show the virtual memory size of the Oracle Java/WildFly process.
ps -e -o ruser,group,pid,vsz,comm | grep java
4. How much memory is WildFly allowed?
The Java -Xmx setting is the maximum Java heap size. Confirm the -Xmx setting for the Oracle Java/WildFly processes by using the following command:
ps -ef | grep java oracle 7258 1 1 Aug11 ? 16:58:16 /usr/lib64/jvm/java/jre/bin/java ... -Xmx512m ...
This can then be compared to the results from step 3. If the WildFly memory usage is significantly greater than the maximum Java heap size, then there may be a Java leak.
5. Check the Oracle database memory settings Next, determine how much memory has been allocated to the Oracle database.
- The SGA, or Shared Global Area, is the memory the Oracle database uses to share information between processes.
- The PGA, or Process Global Area, is the memory Oracle database processes use.
Connect to the database as SYSDBA, and issue the following commands.
SQL> set linesize 128 SQL> show parameter sga_target NAME TYPE VALUE ------------------------------------ -------------------------------- ------------------------------ sga_target big integer 7584M SQL> show parameter pga_aggregate_target NAME TYPE VALUE ------------------------------------ -------------------------------- ------------------------------ pga_aggregate_target big integer 4072M
6. Check actual PGA usage
While still connected to the database, issue the following SQL statement to show the actual PGA being used.
SQL> SELECT SUM(PGA_ALLOC_MEM)/1024/1024 "Total PGA Allocated (Mb)" FROM v$process p, v$session s WHERE p.addr = s.paddr;
7. Check for Memory Segments
However, it's not only user processes that use memory, there is also something called Shared Memory Segments. To determine the Shared Memory Segments, please use the following command.
ipcs -m
If there is only one Oracle database, the result may look like this:
------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 20021251 oracle 640 2940928 94 0x00000000 20054020 oracle 640 7046430720 47 0x00000000 20086789 oracle 640 13836288 47 0x85e757a0 20119558 oracle 640 32768 47
If there are Shared Memory Segments where the owner column has a user other than oracle" then take note of how many bytes the Shared Memory Segments are using.
8. Adding it all up
Now we can add up all the pieces of information, and then compare it to the amount of RAM the operating system has available.
The formulas are:
- Non-Oracle memory consumption = Non-Oracle process (step 2) + non-Oracle Memory Segments (step 7)
- Oracle memory allocation = Oracle Java/WildFly process (step 3) + sga_target + pga_aggregate_target (step 5).
If the non-Oracle memory consumption + Oracle memory allocation is GREATER THAN the RAM (step 1), then the memory on the system has been over-subscribed. To resolve the problem, then the choices are;
- Get rid of some of the non-Oracle processes and/or memory segments. For this operation, please engage the System Administrator.
or
An Oracle process exceeds the PGA limit
The PGA limit in an Oracle database is set by the Oracle database parameter PGA_AGGREGATE_TARGET. When an Oracle process exceeds the PGA limit, there are specific memory allocation names reported in the parentheses () of the ORA-04030 error. However, the RSA Identity Governance & Lifecycle product does not use the PL/SQL language components that can exceed the PGA limit.
- PL/SQL Memory Collections
- PL/SQL Tables
- Local PL/SQL variables/varrays
Therefore, the RSA Identity Governance & Lifecycle product will not report an ORA-04030 error because it has exceeded the PGA_AGGREGATE_TARGET setting of the Oracle database. |