Resolve ORA-04030 Out of Process Memory Errors
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.
ORA-04030: out of process memory when trying to allocate occurs when an Oracle process cannot obtain the operating system memory it requires.
The error can occur when:
- The system exhausts its available physical memory.
- The process exhausts the memory available in the Program Global Area (PGA).
The ORA-04030 error message identifies the amount of memory the process attempted to allocate and provides information about where the memory allocation failed.
An ORA-04030 error can occur in either a client process or a database process. When the error occurs in a database process, Oracle Database records it in the database instance alert log. The alert log points to an associated trace file that contains additional diagnostic information that can help identify the cause.
Resolving an ORA-04030 error typically requires addressing the underlying memory limitation. Depending on the cause, you might need to:
- Increase the available physical memory.
- Adjust the PGA configuration.
- Optimize resource usage.
- Review operating system resource limits.
- Identify and resolve memory leaks.
For additional information and videos about ORA-04030 errors, see the Oracle Database resources for ORA-04030.
Troubleshoot ORA-04030
Use the following workflow to diagnose and resolve an ORA-04030 error:
- Use Oracle Autonomous Health Framework (AHF) to generate an
ORA-04030Service Request Data Collection (SRDC). - Upload the diagnostic collection to the My Oracle Support
ORA-04030troubleshooting tool and review its recommendations. - If the problem cannot be resolved using the recommendations, create a Service Request (SR) and use the diagnostic collection to assist Oracle Support.
Generate an ORA-04030 Diagnostic Collection
Log in to the system where the ORA-04030 error occurred.
As the Oracle software owner, run:
tfactl diagcollect -srdc ORA-04030
AHF prompts you to specify the date and time when the ORA-04030 error occurred.
If you do not know the exact date and time, press Enter to allow AHF to search for applicable occurrences.
AHF also prompts you to specify 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
After the collection completes, AHF packages the diagnostic information into a ZIP file for each system included in the collection.
For subsequent troubleshooting, use the diagnostic ZIP file generated for the node on which the ORA-04030 error occurred.
Review ORA-04030 Recommendations in My Oracle Support
After generating the AHF diagnostic collection, use the My Oracle Support ORA-04030 troubleshooting tool to analyze the problem.
- Sign in to My Oracle Support.
- Search for
ORA-04030, or open theORA-04030troubleshooting tool. - Proceed to the diagnostic collection step.
- Select the option to upload a TFA package.
- Select the ZIP file generated by AHF for the node on which the error occurred.
- Upload the diagnostic package.
- After the upload completes, proceed to the next step in the troubleshooting tool.
The troubleshooting tool analyzes the diagnostic collection and compares information from the logs with known ORA-04030 problems.
Based on its analysis, the tool can recommend a relevant My Oracle Support Knowledge document. The recommended document can provide:
- Troubleshooting instructions.
- Known issues associated with the
ORA-04030error. - Related Oracle Database bugs.
- Information about Database Release Updates (RUs) that contain applicable fixes.
Review the recommendations and determine whether one of the identified solutions resolves the problem.
Create a Service Request
If the My Oracle Support troubleshooting tool does not identify an appropriate solution, or if you require additional assistance, create a Service Request with Oracle Support.
- Select Create SR in the troubleshooting tool.
Provide the requested information, including:
- Product
- Product version
- Support Identifier
- Operating system
- SR severity
- Select Create SR.
My Oracle Support creates the Service Request and assigns an SR number.
The AHF diagnostic collection uploaded during troubleshooting is associated with the Service Request so that Oracle Support can use the collected diagnostic information to continue the investigation.