Benx Blog

五月 12, 2007

Diigo Diary 05/11/2007

Filed under: Diigo Diary — benxshen @ 8:35 上午

城市胡同: 發表是最好的記憶  Annotated






            Preventing Java’s java.lang.OutOfMemoryError: PermGen space failure | Eric’s Agile Answers  Annotated

            • 又是一位和我一樣都慘遭 “PermGen Space" 錯誤的開發者了!
              其中這篇文章所提到的技術,恰巧都是我現在所發生問題的架構,像是 Hibernate, Spring, Tomcat 等,還有 Sun JVM…. Orz
              比較特別的是,多數提供的解決方式,都是去調整 JVM 的設定(-XX:MaxPermSize=256m)。這位老兄則是採用了 BEA JRockit 版本的 JVM 解決此問題,他表示至少這招對他是管用的!

               – post by benxshen

            The “OutOfMemoryError: PermGen space" message is normally encountered during development activites where a long-running JVM is asked to load/unload builds.

              The message is a symptom of an incomplete garbage collection sweep where resources are not properly released upon unload/restart. There is no shortage of debate (Hibernate forum, Sun forum, Spring Framework forum ) regarding which codebase is responsible for this symptom, but the finger of blame has been pointed at CGLIB, Hibernate, Tomcat, and even Sun’s JVM.

                In my experience, the most pain-free method of resolving this issue is to switch from Sun’s JDK implementation to BEA’s freely available JRockit implementation.

                  On a recent project utilizing Tomcat 5.5.12 with Hibernate, I was plagued with this PermGen error, at times even experiencing it during web-based unit testing. Since making the switch to JRockit, I have not encountered this issue even once.

                    發表迴響 »


                    RSS feed for comments on this post. TrackBack URI




                    您的留言將使用 帳號。 登出 / 變更 )

                    Twitter picture

                    您的留言將使用 Twitter 帳號。 登出 / 變更 )


                    您的留言將使用 Facebook 帳號。 登出 / 變更 )

                    Google+ photo

                    您的留言將使用 Google+ 帳號。 登出 / 變更 )

                    連結到 %s

                    在 建立免費網站或網誌.

                    %d 位部落客按了讚: