Metaspace is Java 8's new memory space for storing class meta-data information, and that grows automatically unlike its predecessor PermGen space.
Questions tagged [metaspace]
98 questions
2
votes
0 answers
How to flush Softreference to avoid Metaspace OOM?
I am facing Metaspace OOM in JDK.
There are so many SoftRefence Custom ClassLoaders live which should have been flushed before Metaspace OOM, but not sure why it is not happening?
Is there any way to flush SoftReferences in JDK8 Metaspace?

AKS
- 1,393
- 3
- 19
- 29
2
votes
1 answer
Why is garbage collection log Metaspace value different from provided flag?
I am running a server app on Java 8 with the below flags:
-XX:GCLogFileSize=2097152 -XX:InitialBootClassLoaderMetaspaceSize=33554432 -XX:InitialHeapSize=1610612736 -XX:MaxHeapSize=1610612736 -XX:MaxMetaspaceSize=1073741824…

oguz karakus
- 103
- 1
- 4
- 10
2
votes
1 answer
in java 6 we have set the application server perm gen size as 2GB. what is the equivalent in java 8 meta space
Application server : Jboss EAP 6
We are trying to migrate our application from Java 6 to Java 8.
In java 6 - perm gen size is 2 GB.
What is the perm gen equivalent(Meta space) value in Java 8.
I set
-XX:MetaspaceSize=2g
Is this equivalent to min…

Vijaya Raghavan
- 111
- 4
2
votes
2 answers
Is metaspace allocated out of native memory?
In Java 8, meta space is allocated out of native memory , But i did not get anywhere on net what is native memory ? Per this link it is the memory available to the OS but at Difference between Metaspace and Native Memory in Java , native memory is…

scott miles
- 1,511
- 2
- 21
- 36
2
votes
1 answer
Where Do I Set the Eden Space?
Issue Summary :
Memmory size displayed near PS Eden Space is 639.5 MB WHILE JAVA_OPTS contains -Xms2558m -Xmx2558m (2.5G) .
Details :
After creating seten.sh file , i add this line :
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms2558m -Xmx2558m…

Abdennour TOUMI
- 87,526
- 38
- 249
- 254
1
vote
0 answers
Metaspace OOM after repeated hot deployment of Spring Boot war file in Tomcat
I create a very simple SpringBoot Application accessing Oracle database with one table by JPA. I create a war file and repeatedly deploy and undeploy in a tomcat server. After serveral times there is MetaSpace OOM.
Environment:
a. OS : Ubuntu…

Stephen Wong
- 11
- 2
1
vote
0 answers
Wildfly : Metaspace is not getting cleared even after GC
We're using
OpenJDK 11
Wildfly-17.0.1.Final
Spring + Hibernate Application (Deployed as WAR in Wildfly)
With each deployment, the metaspace keeps on increasing and not getting garbage collected
NOTE: We've set -XX:MaxMetaspaceSize parameter so…

Rahul Kumar
- 91
- 4
1
vote
0 answers
Is there a way to inspect the current content of metaspace in my tomcat application running with Java 8?
Since recently, the metaspace memory of my tomcat application grew to unreasonable sizes, completely overcapping the maximum memory capacity of my server. I have a hunch about what is the cause of this issue, but I would like to confirm that first,…

Zazume
- 11
- 2
1
vote
0 answers
JDK11: JVM MaxRAM wrong value on Kubernetes
I'm facing a problem with JDK 11 with a container running Tomcat 9.0.68.
Short story: the pod get evicted beacuse it exceeds the maximum memory.
I have the following container set up on helm (I know that limits and requests should be the same, but I…

Christopher
- 86
- 6
1
vote
1 answer
After Java 8, Where are the static members of a class stored in Java?
Are the static members of a class - static variables, static blocks, and static methods stored in the Metaspace region after Java 8? If not, where are they stored?
There is no concrete information regarding the same elsewhere. All that I was able to…

Syed Zabi Ulla
- 81
- 7
1
vote
0 answers
Metaspace of Java VM runs full
I am trying to get my Java code to run, but whenever I try the metaspace starts to get full. At first I didn't even notice it since it takes a long time (~1 month) to run full and crash.
The first thing I did was to look into the code, if there were…

Yuri Protector
- 11
- 3
1
vote
1 answer
why my JVM did 3 times of FullGC when it started
My job is a Flink TaskManager job. When it starts, it starts 3 times of GC. I don't know why when it reached the MetadataGCThreshold it increased Tenured Space, while Metaspace didn't change, and even increased between GCs.
I thought FullGC would…

wangyk
- 53
- 7
1
vote
1 answer
Why is the default MaxMetaspaceSize on Java very large?
I checked the default MaxMetaspaceSize on the JVM by printing JVM parameters as follows
java -XX:+PrintFlagsFinal -version | grep MaxMetaspaceSize
uintx MaxMetaspaceSize = 18446744073709547520 …

Nilushan Costa
- 286
- 2
- 6
- 24
1
vote
1 answer
Removing MaxMetaspaceSize ("-XX:MaxMetaspaceSize=1g") parameter in Production server causing another error : heap out of memory error
In my server, I have total 16GB memory. JVM max memory(Xmx)is assigned to 12GB. In JVM, we are running WSO2 ESB. We had set MaxMetaspaceSize=1g in JVM. That frequently gave us the following error.
java.lang.OutOfMemoryError: Metaspace
Then we…

Pradeep Sanjeewa
- 1,911
- 1
- 14
- 25
1
vote
1 answer
Tomcat 8 metaspace OutOfMemory issue
I'm using tomcat 8 with jdk 8.
Metaspace is set to 1GB which I feel is very enough,I'm getting OutOfMemoryError exception.
I have tryed checking the class (SSLEngineImpl.java:1796)to get what is causing this but it seems that the line in error is…

Zizou
- 831
- 1
- 10
- 19