Monday, May 27, 2024

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

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).

◉ 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 out of process memory when trying to allocate - 3 Step Resolution

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 out of process memory when trying to allocate - 3 Step Resolution

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 Autonomous Health Framework to generate an ORA-04030 Service Request Data Collection (SRDC)

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

The Autonomous Health Framework 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.

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

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

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

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

Before Autonomous Health Framework, 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 Autonomous Health Framework 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 Autonomous Health Framework 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.

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 out of process memory when trying to allocate - 3 Step Resolution

Select the first radio button to choose to upload a Trace File Analyzer package. (Trace File Analyzer is one of the components of Autonomous Health Framework)

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

Then press the Upload button.

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

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

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

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 out of process memory when trying to allocate - 3 Step Resolution

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 out of process memory when trying to allocate - 3 Step Resolution

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 out of process memory when trying to allocate - 3 Step Resolution

Source: oracle.com

Related Posts

0 comments:

Post a Comment