I been troubleshooting some out of memory errors in IS 6.5 SP2. These aren’t your normal running out of heap space type of memory issues. These out of memory errors are occurring in the non-heap space specifically in the PermGen memory space. JVM is Sun’s 1.5.0_10.
The PermGen space is reserved for class metadata and interned strings. Since I have never seen an java.lang.OutofMemory: PermGen space failure before, I had to do a little research on what the heck it was and why was it running out of memory.
I still don’t have the answer to why it is running out of memory but I’ll share what I know so far. If you have run into this and have some advice please jump right in.
The PermGen space is allocated 64M by default in Sun’s 1.5.0_10. It can be adjusted up by using these switches: -XX:PermSize and -XX:MaxPermSize.
There is some debate about whether garbage collection occurs in this space, but I have successfully tested that it does. Using a tool that is bundled in 1.5 called JConsole, I monitored the affected of load and unloading packages in the IS server.
For the test I simply reloaded the WmMonitor package numerous times until the PermGen memory limit was reached. At that time the Garbage collector kicked in and reduced the memory footprint back down to normal.
I found some discussions on the following switches:
-XX:+UseConcMarkSweepGC
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
I ran the test with these enabled. I found no difference as to when the Garbage collector kicked in.
I suspect some sort of dangling reference is causing some classes not to get unloaded correctly when they should. I going to pursue some thread dumps to see if I can find any danglers. If anyone has run into this before, please share your insights.
#webMethods-Archive#Integration-Server-and-ESB#webMethods