OutOfMemoryError: PermGen space « Content Management etc.
OutOfMemoryError: PermGen space
I encountered this error with Tomcat 5.5 and in Eclipse as well when using Web Tools features. Adding the following JVM options resolved the problem:
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:MaxPermSize=256M
Of course, you can use a different value for the MaxPermSize
depending upon the available RAM.
For Eclipse, I added these options to the shortcut:
C:\programs\eclipse\eclipse.exe -vmargs -Xmx768M -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:MaxPermSize=256M
For Tomcat, I edited catalina.bat
to add the following line:
set JAVA_OPTS=%JAVA_OPTS% -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:MaxPermSize=256M
没有评论:
发表评论