7.7 Resolving ORA-04030 out of process memory when trying to allocate
For more information and videos, see https://blogs.oracle.com/database/post/ora-04030.
Follow these step-by-step instructions for everything you need to do to resolve ORA-04030
.
Understanding ORA-04030
The ORA-04030
: out of process memory when trying to allocate bytes, occurs when an Oracle process runs out of operating system memory.
- Exhausting total machine memory. That is, there isn't enough physical RAM on the machine
(or)
- Exhausting designated space in the Program Global Area, known as the PGA.
The error message will show how much memory the process tried to allocate and provide details of where the allocation failure happened.
Figure 7-31 ORA-04030 Internal Error Code: Arguments

ORA-04030
can occur in either a client or database process. If raised by a database process then an entry will be made in the database alert log, which will point to a trace file containing more details, which can be useful to identify the cause.
Figure 7-32 Database Instance Alert Log

Resolving an ORA-04030
error typically involves addressing the memory limitations that caused it.
- Increasing available RAM
- Adjusting PGA size
- Optimizing resource usage
- Reviewing operating system limits
- Identifying and resolving memory leaks
ORA-04030 Error Troubleshooting Steps
The basic resolution steps for ORA-04030
are:
- Use AHF to generate an
ORA-04030
Service Request Data Collection (SRDC) - Use
ORA-04030
Troubleshooting Tool to find recommendations - Log a new SR using the diagnostic collection
Use AHF to generate an ORA-04030 Service Request Data Collection (SRDC)
In the first step, use AHF to generate an ORA-04030
diagnostic collection.
- Log into the machine where the
ORA-04030
occurred and as theOracle
user run the command:tfactl diagcollect –srdc ORA-04030
You’ll be prompted to enter the date and time of the
ORA-04030
you’re interested in. If you’re not sure, just press return. You'll then be prompted to enter the database name.For example:$ tfactl diagcollect -srdc ORA-04030 Enter the time of the ORA-04030 [YYYY-MM-DD HH24:MI:SS,<RETURN>=ALL] : Enter the Database Name [Required for this SRDC] : Components included in this collection: OS DATABASE CHMOS SOSREPORT Preparing to execute support diagnostic scripts. Executing DB Script srdc_db_sid_memorysizes_11gplus.sql on CDB12 with timeout of 300 seconds... Collecting data for all nodes TFA is using system timezone for collection, All times shown in PDT. Scanning files from 2024-03-25 10:07:36 PDT to 2024-03-25 10:40:07 PDT Collection Id : 20240325104016mymachine03 Detailed Logging at : /opt/oracle.ahf/data/repository/srdc_ora4030_collection_Mon_Mar_25_10_40_19_PDT_2024_node_all/diagcollect_20240325104016_mymachine03.log Waiting up to 120 seconds for collection to start 2024/03/25 10:40:24 PDT : NOTE : Any file or directory name containing the string .com will be renamed to replace .com with dotcom 2024/03/25 10:40:24 PDT : Collection Name : tfa_srdc_ora4030_Mon_Mar_25_10_40_18_PDT_2024.zip 2024/03/25 10:40:24 PDT : Collecting diagnostics from hosts : [mymachine04, mymachine03] 2024/03/25 10:40:25 PDT : Getting list of files satisfying time range [03/25/2024 10:07:36, 03/25/2024 10:40:07] 2024/03/25 10:40:25 PDT : Collecting Additional Diagnostic Information... 2024/03/25 10:40:44 PDT : Collecting ADR incident files... 2024/03/25 10:41:06 PDT : Executing TFA rdahcve with timeout of 600 seconds... 2024/03/25 10:41:08 PDT : Executing IPS Incident Package Collection(s)... 2024/03/25 10:41:10 PDT : Generating IPS Pack for 1 incidents on database cdb12 2024/03/25 10:41:17 PDT : Executing SQL Script db_feature_usage.sql on cdb12 with timeout of 600 seconds... 2024/03/25 10:41:17 PDT : Executing Collection for OS with timeout of 1800 seconds... 2024/03/25 10:41:25 PDT : Executing Collection for SOSREPORT with timeout of 1860 seconds... 2024/03/25 10:42:30 PDT : Completed Collection of Additional Diagnostic Information... 2024/03/25 10:42:35 PDT : Completed Local Collection 2024/03/25 10:42:35 PDT : Not Redacting this Collection on Exadata with no redaction option passed .. 2024/03/25 10:42:35 PDT : Not Redacting this Collection ... 2024/03/25 10:42:35 PDT : Remote Collection in Progress... 2024/03/25 10:42:56 PDT : Collection completed on host: mymachine04 2024/03/25 10:42:56 PDT : Collection completed on host: mymachine03 2024/03/25 10:42:56 PDT : Completed collection of zip files. .---------------------------------------. | Collection Summary | +-------------+-----------+------+------+ | Host | Status | Size | Time | +-------------+-----------+------+------+ | mymachine04 | Completed | 21MB | 113s | | mymachine03 | Completed | 36MB | 131s | '-------------+-----------+------+------' Logs are being collected to: /opt/oracle.ahf/data/repository/srdc_ora4030_collection_Mon_Mar_25_10_40_19_PDT_2024_node_all /opt/oracle.ahf/data/repository/srdc_ora4030_collection_Mon_Mar_25_10_40_19_PDT_2024_node_all/mymachine04.tfa_srdc_ora4030_Mon_Mar_25_10_40_18_PDT_2024.zip /opt/oracle.ahf/data/repository/srdc_ora4030_collection_Mon_Mar_25_10_40_19_PDT_2024_node_all/mymachine03.tfa_srdc_ora4030_Mon_Mar_25_10_40_18_PDT_2024.zip
Once it’s finished AHF will package everything for you in a zip file for each machine, as you progress you'll only need the one from the node where the problem occurred.
Now, we can move onto step number two. Use the My Oracle Support ORA-04030 troubleshooting tool to find recommendations.
Use ORA-04030 Troubleshooting Tool to find recommendations
- Log into My Oracle Support and search for
ORA-04030
, or alternatively go to My Oracle Support ORA-04030 troubleshooting tool to access it directly. - When you get to the troubleshooting tool click the Next button at the top right.
Figure 7-33 My Oracle Support ORA-04030 Troubleshooting Tool
- Select the first radio button to choose to upload a TFA package.
- Then click the Choose file button, select the zip file AHF captured for you in step 1.
- Then press the Upload button.
Figure 7-34 Choose Upload
- Once this is uploaded click the Next button at the top right again.
Figure 7-35 Choose Upload
The troubleshooting tool will then analyze the contents of the diagnostic collection and compare the log entries against its list of known problems. It will then recommend a My Oracle Support (MOS) Knowledge document for you that it thinks is the best fit. This knowledge document will either advise you what to do or show you several bugs where that ORA-04030
has been reported. You can use this to look up which Database Release Update (RUs) fixed the bug. If you go through the MOS troubleshooting tool and can’t find a solution, or you just need some more help, then you can easily log an SR with Oracle Support.
Log a new SR using the diagnostic collection
- Press the Create SR button at the bottom.
Figure 7-36 Create SR
- You’ll then be prompted to clarify your:
- Product
- Product Version
- Support Identifier
- Operating System
- SR severity
- Then press the Create SR button.
And, you’ll get a new SR number.
Figure 7-37 New SR
The AHF diagnostic collection you uploaded originally will be routed onto your SR and Oracle Support will take over.
Parent topic: Resolve Database Issues