What can be done with 'PermGen out of space' exception in Tomcat-Spring-Hibernate web application?

前端 未结 8 1022
隐瞒了意图╮
隐瞒了意图╮ 2020-12-05 05:12

We have an web application that uses Spring-Hibernate to persist registered users data in Oracle database. The application works fine in development environment, but when we

8条回答
  •  感动是毒
    2020-12-05 05:48

    You must be aware that some versions of Tomcat have memory leaks on war redeployment. It happened to me on tomcat 6.0.x.

    As suggested increase the MaxPermSize, this is a temporary solution for your development machine - and when you get the error, after 2-3 days, just restart the server. On production is not that simple. So this works for development, but this approach doesn't work for production, where you should have the memory leaks issues fixed.

    To discover the leaks use the jconsole application that comes with jdk 1.6 and 1.5. You can bind to a process, and watch memory used over time.

    You can also read these:

    • http://frankkieviet.blogspot.com/2006/10/classloader-leaks-dreaded-permgen-space.html
    • http://frankkieviet.blogspot.com/2006/10/how-to-fix-dreaded-permgen-space.html
    • http://java.sun.com/developer/technicalArticles/J2SE/monitoring/index.html
    • http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror
    • http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back

提交回复
热议问题