Weblogic Exit on out of memory

If weblogic server is crashing frequently with out of memory errors below work around can be helpful till root cause of issue is found.

  1. Configure node manager with CrashRecoveryEnabled=true
  2. Configure weblogic for exit on out of memory as given below

Navigate to $IDMDomain/bin
Add -XX:+ExitOnOutOfMemoryError parameter
a) Edit startManagedWebLogic.sh
Add below lines before export JAVA_OPTION
JAVA_OPTIONS=”-XX:+ExitOnOutOfMemoryError ${JAVA_OPTIONS}”
OR
b) Open weblogic console, navigate to Home >Summary of Servers >managed_server>Configuration>Server start
Add below line in argument
-XX:+ExitOnOutOfMemoryError
Restart managed server

So when ever there is out of memory error, on first occurrence weblogic server will exit and node manager will restart the server. However, you must investigate for root cause of out of memory error for permanent fix.


Advertisements