Skip to content

Instantly share code, notes, and snippets.

@AhmedKammorah
Last active December 26, 2015 05:49
Show Gist options
  • Save AhmedKammorah/7103423 to your computer and use it in GitHub Desktop.
Save AhmedKammorah/7103423 to your computer and use it in GitHub Desktop.
change heap memory config forr tomccat
top
get pid
jmap -heap <pid>
add \usr\share\tomcat7\bin\setenv.sh
add
export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"
>/etc/init.d/tomcat6 restart
ref :
http://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/
>vi /usr/share/tomcat6/bin/catalina.sh
add
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms512m -Xmx512m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"
>/etc/init.d/tomcat6 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment