Locating code that is filling PermGen with dead Groovy code
问题 We have had our glassfish instance go down every two weeks for a while with a java.lang.OutOfMemoryError: PermGen space . I increased the PermGen space to 512MB and startet dumping memory usage with jstat -gc . After two weeks I came up with the following graph that shows how the PermGen space is steadily increasing (the units on the x-axis are minutes, y-axis are KB). I tried googling around for some kind of profiling tool that could pinpoint the error and a thread here on SO mentioned jmap,