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

前端 未结 4 1797
野趣味
野趣味 2021-01-01 21:44

I have a perm gen memory leak, that I know. Profiling using jvisualvm shows that when doing hot deployment (e.g. stop and start an application without killing the JVM, in to

4条回答
  •  滥情空心
    2021-01-01 22:30

    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.

提交回复
热议问题