Apache - Answered java lang outofmememory error, Error - java.lang.OutOfMemoryError: PermGen space
Answered java lang outofmememory error
If your server gives a bad gateway error and you can find the below lines in the tomcat error log "java.lang.OutOfMemoryError: PermGen space", try the below solutionAdd the flags along with -Xms and -Xmx values
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabledExample: if in cause your starttomcat is in /usr/sbin/ then edit it and add the flags -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
The final part of the script may look like
./jsvc -user tomcat -Xms1024M -Xmx2048M -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -cp ./bootstrap.jar -Djava.endorsed.dirs=../common/endorsed -outfile ../logs/catalina.out -errfile ../logs/catalina.err -verbose
The topic on Apache - Answered java lang outofmememory error is posted by - Math
Hope you have enjoyed, Apache - Answered java lang outofmememory errorThanks for your time