I'm experiencing an anormally with JRun application server running on SUN JVM. Averagely about once a week, the server crashes without any warnings. On monitoring the memory usage, I noted that there was an unexpected jump in JVM total memory eventhough applications were not requesting extra memory. Attached is a sample screenshot with a browser-based monitoring tool from Adobe. It's showing that at about 11:58am, there was a sudden spike in JVM memory from about 384MB up to about 1022.44MB which crashed the server. The only thing I could find in the logs was a message stating: 'Permgen Space' error. There were no warnings/errors before the crash. The virtual memory used by JRun when it crashed was about 1.3GB. Any thoughts?
My environment is: JRun4 on JVM1.6.0_04 with max heap size (-Xmx) set to 1024m.
You're running out of space in the "permanent generation", where the contents of class files (classes, String literals, other fun stuff) is held. You can try bumping up the space for that memory area using
Ernest Friedman-Hill wrote:You're running out of space in the "permanent generation", where the contents of class files (classes, String literals, other fun stuff) is held. You can try bumping up the space for that memory area using
That looks good, but if you look at the attachment on the original post, the JVM total memory hits the max heap space allocated and (not shown on the graph) starts eating OS virtual memory. The 'used' memory remains low however. As an aside, our MaxPermSize is set to 250MB and max heap size set to 1024MB.
author and iconoclast
That could just be evidence that the JVM tried everything it could do to free up space, including a full GC sweep and then calling sbrk() to grow the address space, before finally giving up. I'm not sure it's smart enough to know whether these measures are going to work or not in advance -- it might be obvious to us that it was a hopeless gesture, but it might not be obvious to it.
Joined: Jan 27, 2006
We increased the MaxPermSize from 256 to 512 and that resolved the issue. Thanks Ernest!