Our old ADF 11gR2 application crashed on Friday due to JVM PermGen OOM. Its weblogic server is scheduled to be restarted every weekend. I analayzed the dump file using Memory Analyzer (MAT). Its leak hunter reports that following highlighted instance is suspicious:
I picked one instance and checked its path to GC root, it seems it’s not garbage collected because “SensorTable” class is referencing it:
I searched metalink and found following document:
This concludes that our analysis is correct.
Following article explains classloader leak very well:
It show how easy a classloader leak could occur. It also shows the amount of leaked memory might be connected to number of requests the server processed. In our case, our server didn’t crash for long time is because we have weekly scheduled reboot and it crashed because the server had been used heavily by users for that week. Moreover, to me, this article also explains the known fact that if we keep redeploying an application in most JEE containers, the server will eventually PermGen OOM, so in prod env, it’s a common practice to reboot the server after each redeployment.