PermGen problems with Lift and Jetty

后端 未结 5 1619
死守一世寂寞
死守一世寂寞 2020-12-23 02:33

I\'m developing on the standard Lift platform (maven and jetty). I\'m repeatedly (once every couple of days) getting this:

Exception in thread \"7048009@qtp-         


        
5条回答
  •  伪装坚强ぢ
    2020-12-23 02:55

    The permanent generation is where the JVM puts stuff that will probably not be (garbage) collected like custom classloaders.

    Depending on what you are deploying, the perm gen setting can be low. Some applications and/or containers combination do contain some memory leaks, so when an app gets undeployed sometimes some stuff like class loaders are not collected, resulting in filling the Perm Space thus generating the error you are having.

    Unfortunately, currently the best option in this case is to max up the perm space with the following jvm flag (example for 192m perm size):

    -XX:MaxPermSize=192M (or 256M)
    

    The other option is to make sure that either the container or the framework do not leak memory.

提交回复
热议问题