Questions tagged [metaspace]

Metaspace is Java 8's new memory space for storing class meta-data information, and that grows automatically unlike its predecessor PermGen space.

98 questions
6
votes
1 answer

Gradle java.lang.OutOfMemoryError: Metaspace

Currently i am working on Spring boot 2.1 project configured with Gradle 5.2.1. But i got out of memory error when building project and could not understand the exact reason. Please find the attached log Caused by:…
WMG
  • 326
  • 3
  • 9
6
votes
1 answer

Applications is slowing with metaspace growth

I just moved from grails 2.4.3 to grails 2.5.6 and from Java 7 to Java 8. I'm trying to set optimal metaspace size in my app. Actual metaspace size has big impact on application performance: Used metaspace and response avg time: 200 MB - 339 ms …
jnr
  • 121
  • 5
6
votes
2 answers

Why Oracle Specification does not tell anything about metaspace?

We all know that since Java 1.8 PermGen was removed and replaced by Metaspace. I have read a lot of topics about Metaspace and I am completely sure that it's exists, but today I was asked about the reference to Oracle JVM specification where is said…
Oleksandr Riznyk
  • 758
  • 1
  • 8
  • 19
5
votes
0 answers

Why does the JVM crash with a "java.lang.OutOfMemoryError: Metaspace" even though Metaspace is not filled up?

I am currently investigating one interesting "java.lang.OutOfMemoryError: Metaspace" issue. Reason I think it is "interesting" as because Metaspace usage was far less than maximum Metaspace size(1GB). Heap and GC configurations are: OS: Windows…
suv3ndu
  • 221
  • 5
  • 12
5
votes
1 answer

jstat and jcmd giving different answers for metaspace memory

I'm currently investigating a compressed class space issue. I know what the issue is, but while investigating, I noticed that jstat -gc ... and jcmd ... GC.heap_info give different numbers of metaspace and compressed class space capacity and…
Bryan Head
  • 12,360
  • 5
  • 32
  • 50
5
votes
1 answer

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…
user1550159
  • 1,197
  • 3
  • 19
  • 36
5
votes
2 answers

OutOfMemoryError: Compressed class space

I got this error: "java.lang.OutOfMemoryError: Compressed class space" and until I'll figure out what's the trigger, I tried to disabling compressed class pointers with -XX:-UseCompressedClassPointers. but I still get this error. how is it…
user3167150
  • 177
  • 3
  • 5
  • 12
4
votes
1 answer

How to solve Metaspace OOM after redeploying a web application in Tomcat multiple times?

Dera all, I am using openjdk 1.8.0_212-b04, Tomcat 8.0.21 and Red Hat 6.4. And I have adjusted the test web application, make sure there will be no such message after redeploying it: WARNING: The web application [Test] appears to have started a…
Leon Chen
  • 387
  • 1
  • 2
  • 14
4
votes
1 answer

Is there any recommended Metaspace setup size for Wildfly?

Is there any best practice for Metaspace Size with WildFly? Example, for the max heap memory I'd the following setup: ((Memory without Wildfly running) * 2) - (Total amount of available memory) I know that Metaspace auto increase if I don't specify…
4
votes
1 answer

Java8 MetaspaceSize flag not working

I have a simple test code that setup both -XX:MetaspaceSize and -XX:MaxMetaspaceSize to a same value. I think the metaspace then should not dynamically resizing. But from my testing (check Metaspace diagram from VisualVM GC and print out log by…
dereck
  • 499
  • 1
  • 10
  • 20
4
votes
1 answer

What happens if you don't specify the maxmetaspace parameter in a java 8 rcp app?

What can happens if you launch and use a heavy java 8 rcp desktop app without specifying the jvm parameters MaxMetaspaceSize and the metaspacesize ? Is it normal that the memory consumed by the heap memory is almost like the non-heap (metaspace)…
NashBird99
  • 193
  • 2
  • 12
4
votes
1 answer

Correct java 8 setup for class unloading (Metaspace cleanup) / cxf issue

I'm creating dynamic CXF clients in my application. This is the code snippet of client creation: JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(); Client client = factory.createClient("wsdl/hello.wsdl"); Now, when I setup…
bilak
  • 4,526
  • 3
  • 35
  • 75
3
votes
1 answer

Metaspace allocated more then MaxMetaspaceSize

In Java 8, I run GC log on my service and via GCeasy I saw that 1GB is allocated to the metaspace, while the peak was around 40m, so why 1 GB was allocated? I play with the flags and added "-XX:MaxMetaspaceSize=10M". Then I got…
moriya
  • 33
  • 3
3
votes
1 answer

How does Metaspace and Native Area memory gets managed in Java?

From what I have understood, the Native Area inside the JVM is completely off-limits for the Garbage Collector. Inside the Native Area, in which Metaspace is located. In the aforementioned Metaspace, we have areas such as Constant Pool, Field and…
ForInfinity
  • 166
  • 1
  • 12
3
votes
1 answer

Java memory areas in java 8

I have read a lot about java memory areas, but looks like it is just a mess. Mostly due to the introduction of a new MetaSpace area instead of PermGen in java8. And there are questions now: What areas does the heap include in java8+ ? Where the…
Ruslan
  • 6,090
  • 1
  • 21
  • 36