Java Class (PermGen) Memory Leak (Web Applications) - Generic Solution?

£可爱£侵袭症+ 提交于 2019-11-30 11:36:58

There is an unsatisfiying but easy solution: Don't hotdeploy in production environments. You could setup a cluster of two servlet containers and them update one at a time with a restart.

The realities of frequent redeployments... Best you can do is increase the size of perm gen using -XX:MaxPermSize=256m. This may buy you some redeployments more per jvm restart. Or read on at http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back

Beware that if the classloaders can't be gc-ed at all, fiddling with the jvm won't help at all. You'd better forget about frequent deployments, especially in production, for dev it's handy, nevertheless.

I used the method from this site and it helped. http://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/

Few pointers here as well, http://minmaxmim.blogspot.com/2010/01/javalangoutofmemoryerror-java-heap.html

also check the javalangoutofmemoryerror-permgen-space article.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!