Search code examples
javatomcatmemoryprofilepermgen

PermGen out of space before Max is reached


I run a Java web application on a Tomcat with JPA/Hibernate and frequently get 'PermGen out of space'.

Can anybody explain this graphical memory profile?

Heap memory: I'm running to the maximum, but there is still some room (2.147.483.648 Max, but 1.667.155.688 used)

enter image description here

Non-Heap memory: The size is dropping (94.568.448), while the max allows 5 times more. This is a snapshot just before the 'PermGen out of space' (when Size = Used)

enter image description here

I don't understand this profile. There is still a lot of physical memory left.


Solution

  • This is one of the Tomcat classical questions. One of the best answers is here:

    https://stackoverflow.com/a/10392385/1314276