Monday, July 21, 2014

ORA-04030: Out of Process Memory

This error comes because of shortage of memory available to be provided to a new session’s server process which wants to connect to the database.

Windows 32-bit
This error is more common on 32-bit Windows based systems. On Windows, Oracle session processes run as threads under main oracle.exe process and maximum 2G can be allocated to single OS process under windows 32-bit, and hence when oracle.exe reaches near 2G, it starts throwing ORA-04030.

When Does this Error Come?
Suppose we have allocated 1.5G RAM to SGA, now we have total 500 MB available for the user sessions (remember that maximum 2G for whole oracle.exe). If more and more sessions keep connecting with the database, we can observe (in task manager) that "oracle.exe" memory consumption also keeps increasing. Once this RAM allocation reaches near to 2G, this error would start appearing.

Solution
1. Increase the amount of RAM (if it is not a 32 bit system with restriction of maximum 4G RAM and maximum 2G to a single process).
2. If Windows 32-bit, decrease the size of SGA so that more sessions can connect with the database and no session fails with this error
3. Switch to Shared Server configuration.


No comments: