Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metaspace Memory Leak

We recently migrated our application from Java 7 to Java 8. from the day of cut over, we started seeing Out of Memory Metaspace issues. We tried increasing the metaspace space size, but it didn't help. Jvisual VM(and Jconsole) shows that 60 -70 K class files are getting loaded into memory every day and nothing getting unloaded. we tried using all kinds of GC algorithms and nothing helped. What else can possibly go wrong in never Java version ?

like image 527
user1550159 Avatar asked Jan 31 '23 02:01

user1550159


1 Answers

After some research, we found the solution to our problem. Adding below JVM argument fixed the issue.

-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true

Below are article has good info on the issue. https://issues.apache.org/jira/browse/CXF-2939

Hope this helps.

like image 154
user1550159 Avatar answered Feb 05 '23 17:02

user1550159