java.lang.OutOfMemoryError: Metaspace error after migrating to Java 8 from Java 7

Viewed 19991

We got OutOfMemoryError when upgraded. The JVM settings are kept same as Java 7 which was working fine.

Here is the settings in Jboss 4.2 server:

-server -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Xms4096m -Xmx7168m -XX:MaxMetaspaceSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Djava.security.egd=file:///dev/urandom

Only difference in Java 7 is XX:MaxMetaspaceSize=512m was replace with PermGen max.

I wonder why it needs more Metaspace for class loading since the server & application is same & only change in Java version.

2 Answers
Related