0

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

serg.nechaev
  • 1,323
  • 19
  • 26
  • It´s complicate to say without see the complete log file. I would start for shut down elastic search and mock the search. Can you paste the log in the minute when the memory consume increase considerably. – paul Jun 30 '14 at 14:01
  • The log doesn't really have anything suspicious - request, response + hibernate SQL. I will try to run it with DEBUG on everything. – serg.nechaev Jul 02 '14 at 00:35
  • I can't really reproduce it now, will close the question. Thank you! – serg.nechaev Jul 26 '14 at 04:26

1 Answers1

1

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?

Community
  • 1
  • 1
Lexandro
  • 765
  • 5
  • 14
  • Thanks to your comment I found that I am actually using Java 7, not 8 as I thought - as Java 8 doesn't have permgen space any more. I will reun more tests and will let you know. – serg.nechaev Jul 02 '14 at 00:33
  • He used java 7 and mentioned java 8 has no permgen... your answer is a duplicate dear David... thx for the false down vote... – Lexandro Apr 04 '16 at 17:34