ORA-04030 out of process memory when trying to allocate - 3 Step Resolution

April 8, 2024 | 7 minute read
Text Size 100%:

ORA-04030: out of process memory when trying to allocate bytes, occurs when an Oracle process runs out of operating system memory.

The error is caused by either:

  • Exhausting total machine physical memory
  • Exhausting designated space in the Program Global Area (PGA).

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. 


This can be caused by either:

  • Exhausting total machine memory. i.e. 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.

ora-04030 error structure

 

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.

ORA-04030 Alert Log and Trace File

 

Resolving an ORA-04030 error typically involves addressing the memory limitations that caused it.

This might be:

  • 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 Fix Flow steps for ORA-04030 are:

  1. Use AHF to generate an ORA-04030 Service Request Data Collection (SRDC)
  2. Use ORA-04030 Troubleshooting Tool to find recommendations
  3. Log a new SR using the diagnostic collection

 

1. Use AHF to generate an ORA-04030 Service Request Data Collection (SRDC)

In the first step we’re going to use AHF to generate an ORA-04030 diagnostic collection.

The Autonomous Health Framework, or AHF provides a series of capabilities aimed at making it easier for you to maintain your database.

It’s the same technology Oracle uses in the cloud to keep the Autonomous Database running, and it’s available for you at no extra cost as part of your existing software support agreement.

AHF Services

You can download AHF by logging into My Oracle Support and searching for AHF – or you can just go to http://bit.ly/oracleahf, which will take you directly to the download page.

 

AHF diagnostic collection servic

AHF is capable of collecting various types of diagnostic collections, with problem specific SRDCs being one of them.

Before AHF, Oracle Support might have asked you to go through many different steps as part of SRDC or Service Request Data Collection for ORA-04030. This would involve collecting and trimming different logs and running scripts, to understand how to perform it correctly required watching a video and reading other knowledge documents.

Now all this SRDC logic is packaged within AHF and you can capture it all with a single command.

 

Login to the machine where the ORA-04030 occurred and as the Oracle 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, and then 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 on to step number two. Use the My Oracle Support ORA-04030 troubleshooting tool to find recommendations. 

 

2. Use ORA-04030 Troubleshooting Tool to find recommendations

Log into My Oracle Support and search for ORA-04030, or alternatively go to http://bit.ly/ORA-04030 to access it directly.

When you get to the troubleshooting tool click the Next button at the top right

ORA-04030 Troubleshooting Tool Step 1

Select the first radio button to choose to upload a TFA package. (TFA is one of the components of AHF)

 

Then click the “Choose file” button, select the zip from the failing node that AHF captured for you in step 1.

Then press the Upload button.

 

ORA-04030 Troubleshooting Tool Step 2

 

Once this is uploaded click the Next button at the top right again.

ORA-04030 Troubleshooting Tool Step 3

The troubleshooting tool will then analyze the contents of the diagnostic collection and compare the log entries against its list of known problems and recommend a solution.

ORA-04030 Troubleshooting Tool Step 4

If you go through the MOS troubleshooting tool and can’t find a solution, or you just need some more help, then Oracle Support is just a click away.

 

3. Log a new SR using the diagnostic collection

Press the Create SR button at the bottom.

ORA-04030 Log SR via MOS Troubleshooting Tool 1

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.

ORA-04030 Log SR via MOS Troubleshooting Tool 2

 

That’s it!

The AHF diagnostic collection you uploaded originally will be attached to your SR and Oracle Support will take over.

 

Get started now

To get started today download Oracle Autonomous Health Framework

Troy Anthony


Previous Post

Where is the Complexity?

Todd Little | 10 min read

Next Post


Transportable Binary XML – modern XML document storage in Oracle Database 23ai

Alonso Alavez | 7 min read