How to debug PermGen OutOfMemory errors in Java?


The question can be broken down into the following:

  1. Does the normal HeapDump thrown on OutOfMemoryError information about PermGen ?

  2. What it takes to connect to Java code with tools like jstatd or jconsole . Do I need to run it with certain parameters? What do you need to be able to connect to remote code from VisualVM?

  3. Are there some tools to analyze what jmap -permgen ? It is completely incomprehensible there.


  1. no does not contain
  2. do not know
  3. no idea


  • IMHO such difficult errors will be difficult to catch without a logger, log your code
  • if the increase in space for permgen is not treated, then there is a leak somewhere. Most likely the problem is in the custom class loader, see the code related to class reflection.
Scroll to Top