Thursday, March 17, 2011

Out Of Memory Errors of Oracle Application Server

There are various types of outof memory errors that occurs in the oracle application server.Based on the cause of the error, there are specific ways to fix it.


Root cause of the error and their fix is given below:

OutOfMemoryError: Java Heap Space
Cause: This error is hit when the part of the RAM allocated to JVM for carrying on the OAS task is not sufficient.
Solution: Increase the value of -Xmx. Oracle recommend to have the same value for -Xms and -Xmx.


OutOfMemoryError: PermGen space
Cause: This error occurs when there is not sufficient RAM left for native code i.e. the jar files required by the Application Server. This issue can hit after upgradation/patch on OAS also as more libraries are added which require more RAM.
Solution: Increase -XX:MaxPermSize=256m. On OAS, 256M is sufficient. You can also use -XX:PermSize along with -XX:MaxPermSize in case you want less than 256M RAM allocated to permanent generation during server startup.


OutOfMemoryError: unable to create new native thread
Cause: This error is thrown by the OS when there isn't enough RAM to create a new thread. It is beacuse of high value of -Xmx and -Xss.
Solution: For OAS, -Xss128K is sufficient. In case you are facing any issue you can incrase it to -Xss256K. If decreasing the value of -Xss is not helping then decrease the value of -Xmx.


java.lang.OutOfMemoryError: requested 1224368 bytes for Chunk::new. Out of swap space?
Cause: The cause of this error is same as above. The native objects are not getting enough RAM to use.
Solution: Decrease the value of -Xmx.

No comments:

Post a Comment