serg.nechaev
serg.nechaev

Reputation: 1321

Weird memory behavior under Tomcat 8 (jvisualvm)

I am testing a java webapp on Tomcat 8.0.3 and Java 8 (build 1.8.0-b129 64-Bit Server VM (build 25.0-b69, mixed mode) on Windows 8.1.

The application runs out of memory after just a few mouse clicks. It is known to run fine on Windows 7 with Tomcat 7 and CentOS with Java 8 (open jdk) with 4GB of RAM.

30/06 23:42:56 ERROR (error.ErrorController) org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.OutOfMemoryError: PermGen space

WARNING [RMI TCP Connection(11)-192.168.56.1] ServerCommunicatorAdmin.reqIncoming The server has decided to close this client connection.

The application also uses local ElasticSearch (not sure if it has anything to do with it).

Can you please explain what are the reasons the heap keeps growing while the actual memory usage seems to go down?

enter image description here

Upvotes: 0

Views: 2798

Answers (1)

Lexandro
Lexandro

Reputation: 785

The key here is the "PermGen space". This space is used for loading .class files. Maybe you have too much jar/other libs on your classpath or your standard permgen size is not enough.

Here's a good description how to set custom permGen space for Tomcat:

How do I properly set the permgen size?

Upvotes: 1

Related Questions