Search code examples
javajenkinsantweblogicapplication-server

After multiple weblogic deployments "java.lang.OutOfMemoryError: Metaspace"


> java.lang.OutOfMemoryError: Metaspace     at

> java.lang.ClassLoader.defineClass1(Native Method)     at
> java.lang.ClassLoader.defineClass(ClassLoader.java:760)   at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>   at
> weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:412)

Exception after 5-6 deployments to weblogicServer cluster with the help of Jenkins, build tool used is Ant. Restarting the ManagedServer and Adminconsole temporarily fixes the issue.

Possible duplicate : java8 "java.lang.OutOfMemoryError: Metaspace"

What could be the issue ?


Solution

  • Gotcha !

    Admin console is currently holding 2 ManagedServers, both ManagedServers having low MaxMetaspaceSize, updated the value from 512 MB to 1024 MB.

     XX:MaxMetaspaceSize=1024m
    

    Issue is fixed !

    Reference : Understand the OutOfMemoryError Exception