Sunday, April 20, 2008

ORA-04030: out of process memory when trying to allocate string bytes

ORA-04030: out of process memory when trying to allocate string bytes (string,string)

Cause: Operating system process private memory has been exhausted

Action: none


ORA-04030: "out of process memory when trying to allocate %s bytes (%s,%s)":

The operating system's process private memory has been exhausted and a "malloc" function has failed. The database administrator or operating system administrator can often resolve this by increasing the process memory quota. (O/S specific parameters: maxdsiz, maxtsiz, maxssiz, maxdsiz64, maxtsiz64, maxssiz64 and "max_per_proc_data_size", "max_per_proc_address_space", "max_per_proc_stack_size" )

The user resource limit (ulimit) may be the problem. You could try setting it to unlimited for memory.

There may be a bug in the application that causes excessive allocations of process memory space, typically because it is not freeing up the space, such as opening cursors but not closing them.

It is important that the full error message is available. The part in the parenthisis will tell more about the memory structure that was having problems.

As a workaround you can try calling dbms_session.free_unused_user_memory at key points in code. This releases the unused session memory.

You can set event="4030 trace name errorstack level 10" in the init.ora to generate a trace file when you reproduce this problem.

No comments: