My Oracle Support Banner

Error "OCI-04030: out of process memory when trying to allocate" Occurs when De-Qeueing Messages from AQ JMS. (Doc ID 807785.1)

Last updated on MAY 02, 2024

Applies to:

JDBC - Version 11.1.0.6 to 11.1.0.6 [Release 11.1]
Information in this document applies to any platform.

Symptoms

-- Problem Statement:
On 11.1.0.6.0 in Production:
There is a Java application that uses an AQ JMS connection using OCI to dequeue messages from a transactional queue containing AdtMessages with an XMLType payload (which is an LCR).

The connection method works like this:
AQjmsFactory -> TopicConnectionFactory -> TopicConnection -> TopicSession -> Topic
-> TopicReceiver

The application dequeues the messages in sets comprised of transactions. The string value of each
XMLType is extracted, so the transaction is eventually represented as a Java List of Strings (the
references to the AdtMessage and XMLType objects are released). Each transaction is processed
individually (sent to another machine), committed, and released. All transactions in the queue
are processed until the queue is empty, when the connection to the queue is closed. The
application polls the queue every thirty seconds, creating a new connection each time.

This application has been tested on many different machines, and works successfully for days at a
time. Occasionally, the application malfunctions when it appears to retrieve a truncated XML
string message. This appears to be caused by the OCI driver as it runs out of memory. Instead of
returning an error or exception, it returns a truncated message. The following error message is
produced:

Errors in file :
OCI-21503: program terminated by fatal error
OCI-04030: out of process memory when trying to allocate 78016 bytes
(qmxCreateOCISt,qmemNextBuf:Large Alloc)


Subsequent Java memory allocation causes the VM to generate a Hotspot error report for an
OutOfMemoryError and die (the OutOfMemoryError is not delivered to the application).

This does not seem to be a gradual memory leak. There is no process size increasing
gradually over the span of many days. The problem does not appear to be related to the number of
connections created, or the number of transactions or messages dequeued. When the application is
restarted, the transaction messages are dequeued without any problem (in the latest occurrence,
the transaction consisted of only 2 messages).

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.